浏览代码

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.
Marian Beermann 8 年之前
父节点
当前提交
a8d921a54c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      borg/archive.py

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