mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-04 06:17:25 +00:00
Merge pull request #2968 from ThomasWaldmann/fix-timestamp-option-1.1
borg create --timestamp: set start time, fixes #2957
This commit is contained in:
commit
84d13f92b3
1 changed files with 6 additions and 8 deletions
|
@ -446,15 +446,13 @@ def save(self, name=None, comment=None, timestamp=None, additional_metadata=None
|
||||||
self.items_buffer.flush(flush=True)
|
self.items_buffer.flush(flush=True)
|
||||||
duration = timedelta(seconds=time.monotonic() - self.start_monotonic)
|
duration = timedelta(seconds=time.monotonic() - self.start_monotonic)
|
||||||
if timestamp is None:
|
if timestamp is None:
|
||||||
self.end = datetime.utcnow()
|
end = datetime.utcnow()
|
||||||
self.start = self.end - duration
|
start = end - duration
|
||||||
start = self.start
|
|
||||||
end = self.end
|
|
||||||
else:
|
else:
|
||||||
self.end = timestamp
|
end = timestamp + duration
|
||||||
self.start = timestamp - duration
|
start = timestamp
|
||||||
end = timestamp
|
self.start = start
|
||||||
start = self.start
|
self.end = end
|
||||||
metadata = {
|
metadata = {
|
||||||
'version': 1,
|
'version': 1,
|
||||||
'name': name,
|
'name': name,
|
||||||
|
|
Loading…
Reference in a new issue