We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87460b8 commit 48c7635Copy full SHA for 48c7635
1 file changed
client/deis.py
@@ -296,8 +296,9 @@ def readable_datetime(datetime_str):
296
Return a human-readable datetime string from an ECMA-262 (JavaScript)
297
datetime string.
298
"""
299
- dt = parser.parse(datetime_str)
300
- now = datetime.now()
+ timezone = tz.tzlocal()
+ dt = parser.parse(datetime_str).astimezone(timezone)
301
+ now = datetime.now(timezone)
302
delta = relativedelta.relativedelta(now, dt)
303
# if it happened today, say "2 hours and 1 minute ago"
304
if delta.days <= 1 and dt.day == now.day:
0 commit comments