Skip to content

Commit 974d711

Browse files
committed
fix natural day calculation #1100
1 parent c43d712 commit 974d711

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/app/templatetags/app_tags.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,10 @@ def status_color(status):
231231
@register.filter
232232
def natural_day(datetime, user):
233233
"""Format date with natural language (Today, Tomorrow, etc.)."""
234-
# Get today's date in the current timezone
235234
today = timezone.localdate()
236235

237-
# Extract just the date part for comparison
238-
datetime_date = datetime.date()
236+
local_dt = timezone.localtime(datetime)
237+
datetime_date = local_dt.date()
239238

240239
# Calculate the difference in days
241240
diff = datetime_date - today

0 commit comments

Comments
 (0)