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.
This commit is contained in:
Marian Beermann 2016-12-17 11:37:56 +01:00
parent 2dc558a02e
commit a8d921a54c
1 changed files with 2 additions and 1 deletions

View File

@ -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: