garethgeorge / backrest

Backrest is a web UI and orchestrator for restic backup.
GNU General Public License v3.0
1.16k stars 37 forks source link

Time zone issue for plans, checks, and prunes #335

Closed ovizii closed 5 hours ago

ovizii commented 3 months ago

Note: if you have a question or need support please post in the discussions area.

Describe the bug Plans with cron jobs, checks and prunes are skewed by 2 hours.

To Reproduce Steps to reproduce the behaviour:

  1. Go to a plan a schedule it say for 3am.
  2. Click your repo, operation list and it is scheduled for exactly 5am
  3. The same goes for all the others I mentioned.

Expected behaviour I'd like to know when/where to correct this.

Screenshots

image

image

Platform Info

Additional context I commented in this issue, but it got closed, unfortunately. https://github.com/garethgeorge/backrest/issues/162

garethgeorge commented 3 months ago

Sorry about that, seeing that I never actually commented on what I'd fixed in that bug. The right way to set the timezone is by setting TZ=<your timezone> e.g. TZ=America/Los_Angeles in your compose config.

I've gone ahead and updated the README and Wiki.

ovizii commented 3 months ago

Thanks for taking note. That fixed the issue immediately.

ovizii commented 2 months ago

I need to re-open this, just to double-check it's not my own mistake.

The timezone setting seems to work for plans and repository checks but NOT for repository prunes.

Could somebody please double-check?

garethgeorge commented 1 month ago

Hmm, timezone formatting should be the same for all operation types https://github.com/garethgeorge/backrest/blob/4e9973cc12cd7203b83c9eb6a128c75a46f89a64/webui/src/components/OperationTree.tsx#L191

Are you still seeing an issue here?

danktankk commented 1 month ago

this is also an issue for me as well....

I have TZ=America/New_York set and the time is not being honored for me either for me, its off by about 4 hours.

ovizii commented 1 month ago

Hmm, timezone formatting should be the same for all operation types

https://github.com/garethgeorge/backrest/blob/4e9973cc12cd7203b83c9eb6a128c75a46f89a64/webui/src/components/OperationTree.tsx#L191

Are you still seeing an issue here?

Just to let you know, I can't check this for the next few weeks. I had to exchange the hardware backrest was running on. It'll take a while until all is back up and running for me to check again.

ovizii commented 5 hours ago

I have backrest up and running again with version 1.5.1 a all jobs seem to honor my timezone and the backup settings.