Skip to content

Commit cea5090

Browse files
committed
timezone fix
1 parent d5bffce commit cea5090

File tree

1 file changed

+2
-2
lines changed
  • functions-python/backfill_dataset_service_date_range/src

1 file changed

+2
-2
lines changed

functions-python/backfill_dataset_service_date_range/src/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ def backfill_datasets(session: "Session"):
161161
f"Using the timezone: {formatting_timezone} for the service date range."
162162
)
163163
local_service_start_date = formatted_service_start_date.replace(
164-
hour=0, minute=0, tzinfo=formatting_timezone
164+
hour=0, minute=0, tzinfo=ZoneInfo(formatting_timezone)
165165
)
166166
utc_service_start_date = local_service_start_date.astimezone(
167167
ZoneInfo("UTC")
168168
)
169169

170170
local_service_end_date = formatted_service_end_date.replace(
171-
hour=23, minute=59, tzinfo=formatting_timezone
171+
hour=23, minute=59, tzinfo=ZoneInfo(formatting_timezone)
172172
)
173173
utc_service_end_date = local_service_end_date.astimezone(ZoneInfo("UTC"))
174174

0 commit comments

Comments
 (0)