Private
Public Access
1
0

small timezone related change

This commit is contained in:
Sander Roosendaal
2021-09-14 22:05:14 +02:00
parent 2c1e6c5909
commit 86cef108fe
5 changed files with 10556 additions and 2 deletions

View File

@@ -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')