Skip to content

Commit

Permalink
Convert to localtime first
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Aug 9, 2024
1 parent a4f7c33 commit 8dcde45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from django.utils.formats import date_format
from django.utils.html import format_html
from django.utils.timesince import timesince
from django.utils.timezone import localtime
from django.utils.translation import gettext_lazy as _

from accounts.models import User
Expand Down Expand Up @@ -243,7 +244,7 @@ def as_html(self):
{user} {action} {catalog}
</p>
""",
created_at=date_format(self.created_at, "Y-m-d H:i"),
created_at=date_format(localtime(self.created_at), "Y-m-d H:i"),
action=self.get_action_display(),
user=self.user or self.user_string,
project=self.project or self.project_string,
Expand Down

0 comments on commit 8dcde45

Please sign in to comment.