Skip to content

Commit

Permalink
Merge pull request #12 from sown/tds/parsed-set-tz
Browse files Browse the repository at this point in the history
fix for setting timezones on parsed timestamps
  • Loading branch information
TimStallard authored Jul 14, 2024
2 parents 7c34591 + 1ef0392 commit 449e96c
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 449e96c

Please sign in to comment.