don't use .replace for timezone, use .astimezone
This commit is contained in:
parent
e1f8e8a524
commit
6380e80282
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
return LocationType.NAME, event["args"], None
|
return LocationType.NAME, event["args"], None
|
||||||
|
|
||||||
def _timezoned(self, dt, timezone):
|
def _timezoned(self, dt, timezone):
|
||||||
dt = dt.replace(tzinfo=pytz.timezone(timezone))
|
dt = dt.astimezone(pytz.timezone(timezone))
|
||||||
utc_offset = (dt.utcoffset().total_seconds()/60)/60
|
utc_offset = (dt.utcoffset().total_seconds()/60)/60
|
||||||
tz = "UTC"
|
tz = "UTC"
|
||||||
if not utc_offset == 0.0:
|
if not utc_offset == 0.0:
|
||||||
|
|
Loading…
Reference in a new issue