mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +00:00
borg create --timestamp: set start time, fixes #2957
This commit is contained in:
parent
132b618cbe
commit
8a299ae24c
1 changed files with 6 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue