From ccb7ea909f74bb76a597e1b0d9d4e3b93a1eeea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Sun, 30 Mar 2014 22:57:16 +0200 Subject: [PATCH] prune: Use the local time zone (not UTC) when interpreting time --- CHANGES | 2 ++ attic/helpers.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index ef700eb7a..6f8d93f09 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,8 @@ Version 0.12 ------------ (feature release, released on X) +- ``attic prune`` now uses the local time zone (instead of UTC) when + determining which archives to keep. - ``attic mount`` now supports mounting an entire repository not only individual archives (#59) - Added option to restrict remote repository access to specific path(s): diff --git a/attic/helpers.py b/attic/helpers.py index e787e8f51..5f8088443 100644 --- a/attic/helpers.py +++ b/attic/helpers.py @@ -127,7 +127,7 @@ def prune_split(archives, pattern, n, skip=[]): if n == 0: return keep for a in sorted(archives, key=attrgetter('ts'), reverse=True): - period = a.ts.strftime(pattern) + period = to_localtime(a.ts).strftime(pattern) if period != last: last = period if a not in skip: