fix tests
This commit is contained in:
@@ -479,8 +479,8 @@ def garmin_getworkout(garminid, r, activity):
|
||||
|
||||
utc_offset = datetime.timedelta(seconds=offset)
|
||||
now = datetime.datetime.now(pytz.utc)
|
||||
zones = [ttz.zone for ttz in map(pytz.timezone, pytz.all_timezones_set)
|
||||
if now.astimezone(tz).utcoffset() == utc_offset]
|
||||
zones = [ttz.zone for ttz in map(
|
||||
pytz.timezone, pytz.all_timezones_set) if now.astimezone(ttz).utcoffset() == utc_offset]
|
||||
if r.defaulttimezone in zones: # pragma: no cover
|
||||
thetimezone = r.defaulttimezone
|
||||
elif len(zones):
|
||||
@@ -494,8 +494,7 @@ def garmin_getworkout(garminid, r, activity):
|
||||
day=startdatetime.day,
|
||||
hour=startdatetime.hour,
|
||||
minute=startdatetime.minute,
|
||||
second=startdatetime.second,
|
||||
).astimezone(pytz.timezone(thetimezone))
|
||||
second=startdatetime.second,).astimezone(pytz.timezone(thetimezone))
|
||||
|
||||
w.startdatetime = startdatetime
|
||||
w.starttime = w.startdatetime.time()
|
||||
|
||||
Reference in New Issue
Block a user