diff --git a/ago.py b/ago.py index b3d9760..8816d18 100644 --- a/ago.py +++ b/ago.py @@ -20,11 +20,8 @@ def get_delta_from_subject(subject): dt = datetime.fromtimestamp(subject) - # strip timezone data - dt = dt.replace(tzinfo=None) - - # finally, return a timedelta from the datetime - return datetime.now() - dt + # return a timedelta from the datetime, using its timezone (if it has one) + return datetime.now(tz=dt.tzinfo) - dt def delta2dict(delta):