From 8a299ae24ced26dbb53517e594634ea676779bc3 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 24 Aug 2017 04:07:37 +0200 Subject: [PATCH] borg create --timestamp: set start time, fixes #2957 --- src/borg/archive.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/borg/archive.py b/src/borg/archive.py index b27f48aa1..a87219e04 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -445,15 +445,13 @@ def save(self, name=None, comment=None, timestamp=None, additional_metadata=None self.items_buffer.flush(flush=True) duration = timedelta(seconds=time.monotonic() - self.start_monotonic) if timestamp is None: - self.end = datetime.utcnow() - self.start = self.end - duration - start = self.start - end = self.end + end = datetime.utcnow() + start = end - duration else: - self.end = timestamp - self.start = timestamp - duration - end = timestamp - start = self.start + end = timestamp + duration + start = timestamp + self.start = start + self.end = end metadata = { 'version': 1, 'name': name,