Skip to content

Commit 1ef0392

Browse files
committed
fix for setting timezones on parsed timestamps
1 parent 7c34591 commit 1ef0392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backup/rotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def get_snapshots(dataset: str, schname: str) -> list[datetime]:
6969
dates = []
7070
for snap in snaps:
7171
try:
72-
dates.append(datetime.strptime(snap, f"backup-{schname}-%Y-%m-%d")) # noqa: DTZ007
72+
dates.append(datetime.strptime(snap, f"backup-{schname}-%Y-%m-%d").replace(tzinfo=TIMEZONE))
7373
except ValueError:
7474
# snapshot didn't match our scheme, ignore
7575
pass

0 commit comments

Comments
 (0)