Skip to content

Commit

Permalink
fix for setting timezones on parsed timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
TimStallard committed Jul 14, 2024
1 parent 554104e commit 705e2ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup/rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_snapshots(dataset: str, schname: str) -> list[datetime]:
dates = []
for snap in snaps:
try:
dates.append(datetime.strptime(snap, f"backup-{schname}-%Y-%m-%d")) # noqa: DTZ007
dates.append(datetime.strptime(snap, f"backup-{schname}-%Y-%m-%d").replace(tzinfo=TIMEZONE))
except ValueError:
# snapshot didn't match our scheme, ignore
pass
Expand Down

0 comments on commit 705e2ad

Please sign in to comment.