From 0012688e2c57ea127cde2b95a68c1ab207efaca3 Mon Sep 17 00:00:00 2001 From: John Madden Date: Sat, 24 Feb 2024 17:09:39 -0800 Subject: [PATCH] Remove TZ offset --- backend/api/database/models/power_data.py | 2 +- backend/api/database/models/teros_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api/database/models/power_data.py b/backend/api/database/models/power_data.py index 8b5c76a2..243079d0 100644 --- a/backend/api/database/models/power_data.py +++ b/backend/api/database/models/power_data.py @@ -99,7 +99,7 @@ def get_power_data_obj( ).order_by(stmt.c.ts) utc_tz = timezone.utc - la_tz = timezone(timedelta(hours=-8)) + la_tz = timezone(timedelta(hours=0)) for row in db.session.execute(adj_units): data["timestamp"].append(row.ts.replace(tzinfo=utc_tz).astimezone(la_tz)) diff --git a/backend/api/database/models/teros_data.py b/backend/api/database/models/teros_data.py index 1445bdc4..40d09988 100644 --- a/backend/api/database/models/teros_data.py +++ b/backend/api/database/models/teros_data.py @@ -92,7 +92,7 @@ def get_teros_data_obj( ) utc_tz = timezone.utc - la_tz = timezone(timedelta(hours=-8)) + la_tz = timezone(timedelta(hours=0)) for row in db.session.execute(stmt): data["timestamp"].append(row.ts.replace(tzinfo=utc_tz).astimezone(la_tz))