浏览代码

Revert "prune: compute pruning in utc timezone"

This reverts commit 860a48049b3de980c383e1bcf78c7e6ace96c82b.
Thomas Waldmann 2 年之前
父节点
当前提交
8a2fd39212
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      src/borg/archiver/prune_cmd.py

+ 2 - 4
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: