bug fix timezone c2 import
This commit is contained in:
@@ -1335,15 +1335,19 @@ def interactive_otwcpchart(powerdf,promember=0):
|
|||||||
def interactive_agegroup_plot(df,distance=2000,duration=None,
|
def interactive_agegroup_plot(df,distance=2000,duration=None,
|
||||||
sex='male',weightcategory='hwt'):
|
sex='male',weightcategory='hwt'):
|
||||||
|
|
||||||
|
if df.empty:
|
||||||
|
return '',''
|
||||||
|
|
||||||
age = df['age']
|
age = df['age']
|
||||||
power = df['power']
|
power = df['power']
|
||||||
name = df['name']
|
name = df['name']
|
||||||
season = df['season']
|
season = df['season']
|
||||||
|
|
||||||
if duration:
|
if duration:
|
||||||
plottitle = sex+' '+weightcategory+' '+duration+' min'
|
duration2 = int(duration/60.)
|
||||||
|
plottitle = sex+' '+weightcategory+' %s min' % duration2
|
||||||
else:
|
else:
|
||||||
plottitle = sex+' '+weightcategory+' '+distance+'m'
|
plottitle = sex+' '+weightcategory+' %s m' % distance
|
||||||
|
|
||||||
# poly_coefficients = np.polyfit(age,power,6)
|
# poly_coefficients = np.polyfit(age,power,6)
|
||||||
|
|
||||||
|
|||||||
@@ -9389,6 +9389,9 @@ def workout_getc2workout_view(request,c2id):
|
|||||||
except:
|
except:
|
||||||
timezone_str = 'UTC'
|
timezone_str = 'UTC'
|
||||||
|
|
||||||
|
if timezone_str is None:
|
||||||
|
timezone_str = 'UTC'
|
||||||
|
|
||||||
workoutdate = startdatetime.astimezone(
|
workoutdate = startdatetime.astimezone(
|
||||||
pytz.timezone(timezone_str)
|
pytz.timezone(timezone_str)
|
||||||
).strftime('%Y-%m-%d')
|
).strftime('%Y-%m-%d')
|
||||||
|
|||||||
Reference in New Issue
Block a user