Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
thdfw committed Oct 16, 2024
1 parent 9a76ed1 commit 41e704c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,14 @@ async def get_plots(house_alias: str, request: DataRequest, start_ms: int, end_m
sorted_times, sorted_values = zip(*sorted_times_values)
channels[key]['values'] = list(sorted_values)
channels[key]['times'] = pd.to_datetime(list(sorted_times), unit='ms', utc=True)
if 'hp-idu' in key:
print(channels[key]['times'][0])
channels[key]['times'] = channels[key]['times'].tz_convert('America/New_York')
if 'hp-idu' in key:
print(channels[key]['times'][0])
channels[key]['times'] = [x.replace(tzinfo=None) for x in channels[key]['times']]
if 'hp-idu' in key:
print(channels[key]['times'][0])

# Create a BytesIO object for the zip file
zip_buffer = io.BytesIO()
Expand Down

0 comments on commit 41e704c

Please sign in to comment.