summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorsag᠎e <me@laymonage.com>2023-01-05 15:38:19 +0000
committerGitHub <noreply@github.com>2023-01-05 16:38:19 +0100
commit8cf3831822b708270f38fabb630bbdfdfbb41be1 (patch)
tree9f68fb4d031e9d4bb7242fbcf9c37d7a8a82ddc1 /django/utils
parent7d9329935a842510fab5eb2634bf08e40e1cb2cb (diff)
Fixed #34243 -- Fixed timesince() crash with timezone-aware dates and interval longer than 1 month.
Regression in 8d67e16493c903adc9d049141028bc0fff43f8c8.
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/timesince.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/utils/timesince.py b/django/utils/timesince.py
index 701c49bab9..f582d0e4f2 100644
--- a/django/utils/timesince.py
+++ b/django/utils/timesince.py
@@ -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