From 8a2fd39212a5e6c4bacfce4dcf50cf53433f8e26 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 18 Jan 2023 22:41:40 +0100 Subject: [PATCH] Revert "prune: compute pruning in utc timezone" This reverts commit 860a48049b3de980c383e1bcf78c7e6ace96c82b. --- src/borg/archiver/prune_cmd.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/borg/archiver/prune_cmd.py b/src/borg/archiver/prune_cmd.py index 2ba9d3b67..4c4a964b3 100644 --- a/src/borg/archiver/prune_cmd.py +++ b/src/borg/archiver/prune_cmd.py @@ -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: