fixed mktime to arrow.get().timestamp in dataprep
This commit is contained in:
@@ -15,6 +15,7 @@ from pandas import DataFrame,Series
|
|||||||
from pytz import timezone as tz,utc
|
from pytz import timezone as tz,utc
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from time import strftime,strptime,mktime,time,daylight
|
from time import strftime,strptime,mktime,time,daylight
|
||||||
|
import arrow
|
||||||
from django.utils.timezone import get_current_timezone
|
from django.utils.timezone import get_current_timezone
|
||||||
thetimezone = get_current_timezone()
|
thetimezone = get_current_timezone()
|
||||||
from rowingdata import (
|
from rowingdata import (
|
||||||
@@ -1012,7 +1013,8 @@ def new_workout_from_df(r,df,
|
|||||||
|
|
||||||
df.rename(columns = columndict,inplace=True)
|
df.rename(columns = columndict,inplace=True)
|
||||||
|
|
||||||
starttimeunix = mktime(startdatetime.utctimetuple())
|
#starttimeunix = mktime(startdatetime.utctimetuple())
|
||||||
|
starttimeunix = arrow.get(startdatetime).timestamp
|
||||||
df[' ElapsedTime (sec)'] = df['TimeStamp (sec)']
|
df[' ElapsedTime (sec)'] = df['TimeStamp (sec)']
|
||||||
|
|
||||||
df['TimeStamp (sec)'] = df['TimeStamp (sec)']+starttimeunix
|
df['TimeStamp (sec)'] = df['TimeStamp (sec)']+starttimeunix
|
||||||
|
|||||||
Reference in New Issue
Block a user