enzingerm / snapborg

Synchronize snapper snapshots to a borg repository
GNU General Public License v3.0
31 stars 5 forks source link

Snapborg is not Passing UTC Time to Borg #36

Open Jacob-Riddle opened 2 weeks ago

Jacob-Riddle commented 2 weeks ago

Snapborg commit: 9c7b6d1535e755d97713677ce43b770ad6cc77ef OS: OpenSUSE Tumbleweed

I am on Pacific Time. And when I do a borg list <repo>, the time in the archive's name is seven hours head of the time stamp:

home-53-2024-06-26T11:04:50          Wed, 2024-06-26 04:04:50 # 11:04:50 vs 04:04:50

Borg expects UTC time:

--timestamp TIMESTAMP

manually specify the archive creation date/time (UTC, yyyy-mm-ddThh:mm:ss format). Alternatively, give a reference file/directory.

When I run

borg create test::docs2 /home/jacob/Documents/ --progress --timestamp '2024-06-26T13:48:53'

I get

docs2                                Wed, 2024-06-26 06:48:53

Pacific time is seven hours behind UTC and sure enough the difference between 13:48:53 and 06:48:53 is seven hours.

Adjusting the local time by seven hours gives the correct time stamp:

$ borg create test::docs4 /home/jacob/Documents/ --progress --timestamp '2024-06-26T20:48:53'
$ borg list test
...
docs4                                Wed, 2024-06-26 13:48:53