Wrong timezone when defining cron for a plan
Closed this issue · 2 comments
Describe the bug
There's a mismatch between defining a cron for a plan and the actual execution time of that plan. Not a big thing, but at least it's confusing from a usability perspective.
To Reproduce
I am based in Germany, so my timezone is UTC+2 (summertime). When creating a cron I enter "Every Day" at "0", "15" in the cron definition. I would expect the plan to run at 00:15 CET, but after saving the plan is scheduled for 02:15 CET (which is 00:15 UTC). So the time entered is simply put into the cron table without taking timezones into account.
I guess the default timezone for a docker container (I use backrest inside docker) is UTC. So, the docker image should expose a TIMEZONE environment variable to take that into account.
Expected behavior
Cron job is run at the time that is entered into the plan settings.
Platform Info
- Raspberry Pi OS Bookworm + Docker
- Backrest Version 1.1.0
Hey, make sure you're setting the TZ= variable when creating your container, backrest uses the alpine tzdata package in docker to correctly handle this.
Thank you, this works. But I suggest it should be documented in https://hub.docker.com/r/garethgeorge/backrest, section Configuration.