small timezone related change
This commit is contained in:
@@ -1604,7 +1604,6 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
||||
|
||||
startdatetime,startdate,starttime,timezone_str,partofday = get_startdate_time_zone(r,row,startdatetime=startdatetime)
|
||||
|
||||
|
||||
if title is None or title == '':
|
||||
title = 'Workout'
|
||||
|
||||
@@ -1766,6 +1765,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
||||
|
||||
timezone_str = str(workoutstartdatetime.tzinfo)
|
||||
|
||||
|
||||
w = Workout(user=r, name=title, date=workoutdate,
|
||||
workouttype=workouttype,
|
||||
boattype=boattype,
|
||||
@@ -1896,6 +1896,8 @@ def get_startdate_time_zone(r,row,startdatetime=None):
|
||||
else:
|
||||
timezone_str = str(startdatetime.tzinfo)
|
||||
|
||||
startdatetime = startdatetime.astimezone(pytz.timezone(timezone_str))
|
||||
|
||||
startdate = startdatetime.strftime('%Y-%m-%d')
|
||||
starttime = startdatetime.strftime('%H:%M:%S')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user