Whoops, make sure ago actually emits the /correct/ relative timestamps using the right timezone

pull/1/head
Danielle McLean 4 years ago
parent c8faa30724
commit f7d7936499
Signed by: 00dani
GPG Key ID: 8EB789DDF3ABD240
  1. 3
      lemoncurry/jinja2/ago.py

@ -3,4 +3,7 @@ from datetime import datetime
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)

Loading…
Cancel
Save