mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Fixes Document public filename so it will use the local date instead of UTC date
This commit is contained in:
parent
38f4bf4e28
commit
f3dced3199
3 changed files with 39 additions and 23 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue