Commit a89138cf authored by Avisek's avatar Avisek
Browse files

convert all time idx to UTC and make them tz-naive

parent b9da82be
......@@ -65,7 +65,7 @@ def weeklybdxdata(weeks = 4):
r = sess.post(trendvaluesURL, json=payload)
vars_json = json.loads(r.content)
dates = [pd.to_datetime(i['time']) for i in vars_json[0]['dataValues']]
dates = [pd.to_datetime(i['time']).replace(tzinfo=None) for i in vars_json[0]['dataValues']]
column_dict = {'Kissam_Global_OAH value': 'OAH',
'AHU_1 outdoorAirTemp': 'OAT',
'AHU_1 supplyAirTemp': 'SAT',
......@@ -138,9 +138,9 @@ def weeklysolardata(datafolder: str = './energyfreqanalysis/', weeks: int = 4):
# ignore timezone info altogether.
for i in dfr['Dates']:
try:
temp = pd.to_datetime(i,format='%d-%b-%y %I:%M %p CDT')
temp = pd.to_datetime(i,format='%d-%b-%y %I:%M %p CDT') + pd.Timedelta(hours=5)
except:
temp = pd.to_datetime(i,format='%d-%b-%y %I:%M %p CST')
temp = pd.to_datetime(i,format='%d-%b-%y %I:%M %p CST') + pd.Timedelta(hours=6)
timelist.append(temp)
dfr['Dates'] = np.array(timelist)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment