1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-25 23:43:49 +00:00

Revert "prune: compute pruning in utc timezone"

This reverts commit 860a48049b.
This commit is contained in:
Thomas Waldmann 2023-01-18 22:41:40 +01:00
parent 4664176e87
commit 8a2fd39212
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -53,10 +53,8 @@ def prune_split(archives, rule, n, kept_because=None):
a = None
for a in sorted(archives, key=attrgetter("ts"), reverse=True):
# we compute the pruning in UTC time zone
# note: we used to compute the pruning in local timezone (tz=None),
# but this is causing test failures in some time zones (like e.g. UTC+12).
period = a.ts.astimezone(tz=timezone.utc).strftime(pattern)
# we compute the pruning in local time zone
period = a.ts.astimezone().strftime(pattern)
if period != last:
last = period
if a.id not in kept_because: