1
0
mirror of https://github.com/django/django.git synced 2025-10-31 01:25:32 +00:00

Fixed #34243 -- Fixed timesince() crash with timezone-aware dates and interval longer than 1 month.

Regression in 8d67e16493.
This commit is contained in:
sag᠎e
2023-01-05 15:38:19 +00:00
committed by GitHub
parent 7d9329935a
commit 8cf3831822
2 changed files with 11 additions and 2 deletions

View File

@@ -97,6 +97,7 @@ def timesince(d, now=None, reversed=False, time_strings=None, depth=2):
d.hour,
d.minute,
d.second,
tzinfo=d.tzinfo,
)
else:
pivot = d