From a8d921a54cbb9a5e7b86668bd04a050c23110ad4 Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Sat, 17 Dec 2016 11:37:56 +0100 Subject: [PATCH] base archive timestamps on end time The assumption is that if the clock jumps during the Borg run that it was jump-corrected and is now correct, while the start timestamp would be wrong. --- borg/archive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/borg/archive.py b/borg/archive.py index f93e0a8c9..5001d3108 100644 --- a/borg/archive.py +++ b/borg/archive.py @@ -305,7 +305,8 @@ Number of files: {0.stats.nfiles}'''.format( raise self.AlreadyExists(name) self.items_buffer.flush(flush=True) if timestamp is None: - self.end = self.start + timedelta(seconds=time.monotonic() - self.start_monotonic) + self.end = datetime.utcnow() + self.start = self.end - timedelta(seconds=time.monotonic() - self.start_monotonic) start = self.start end = self.end else: