mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-07 07:19:22 +00:00
Fixes Document public filename so it will use the local date instead of UTC date
This commit is contained in:
1 parent
38f4bf4e28
commit
f3dced3199
3 files changed
+39
-23
No files matched your search
@@ -208,7 +208,9 @@ class Document(models.Model):
|
||||
verbose_name_plural = _("documents")
|
||||
|
||||
def __str__(self):
|
||||
created = datetime.date.isoformat(self.created)
|
||||
|
||||
# Convert UTC database time to local time
|
||||
created = datetime.date.isoformat(timezone.localdate(self.created))
|
||||
|
||||
if self.correspondent and self.title:
|
||||
return f"{created} {self.correspondent} {self.title}"
|
||||
|
||||
Reference in new issue
Block a user