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:
parent
4664176e87
commit
8a2fd39212
1 changed files with 2 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue