Whoops, make sure ago actually emits the /correct/ relative timestamps using the right timezone
This commit is contained in:
parent
c8faa30724
commit
f7d7936499
1 changed files with 3 additions and 0 deletions
|
@ -3,4 +3,7 @@ from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
def ago(dt: datetime) -> str:
|
def ago(dt: datetime) -> str:
|
||||||
|
# We have to convert the datetime we get to local time first, because ago
|
||||||
|
# just strips the timezone from a timezone-aware datetime.
|
||||||
|
dt = dt.astimezone()
|
||||||
return human(dt, past_tense='{}', abbreviate=True)
|
return human(dt, past_tense='{}', abbreviate=True)
|
||||||
|
|
Loading…
Reference in a new issue