1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-19 04:41:50 +00:00

prune: Use the local time zone (not UTC) when interpreting time

This commit is contained in:
Jonas Borgström 2014-03-30 22:57:16 +02:00
parent 9ae3d10a99
commit ccb7ea909f
2 changed files with 3 additions and 1 deletions

View file

@ -7,6 +7,8 @@ Version 0.12
------------ ------------
(feature release, released on X) (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 - ``attic mount`` now supports mounting an entire repository not only
individual archives (#59) individual archives (#59)
- Added option to restrict remote repository access to specific path(s): - Added option to restrict remote repository access to specific path(s):

View file

@ -127,7 +127,7 @@ def prune_split(archives, pattern, n, skip=[]):
if n == 0: if n == 0:
return keep return keep
for a in sorted(archives, key=attrgetter('ts'), reverse=True): 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: if period != last:
last = period last = period
if a not in skip: if a not in skip: