You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see that it runs with default UTC time.
This makes it difficult to time everything to specific local times (especially with daylight saving)
I suggest adding support for setting the timezone it runs under in the environment
The text was updated successfully, but these errors were encountered:
In case you are able to set the host system's time (or just want to align the container time and the host time) you can mount /etc/timezone and /etc/localtime (readonly is enough) into the container:
➜ ~ docker run --rm -it --entrypoint ash offen/docker-volume-backup:latest ~ # dateSat Oct 23 13:29:31 UTC 2021
➜ ~ docker run --rm -it --entrypoint ash -v /etc/timezone:/etc/timzeone:ro -v /etc/localtime:/etc/localtime:ro offen/docker-volume-backup:latest~ # dateSat Oct 23 15:29:31 CEST 2021
Does this solve your usecase?
In case the image should support setting an arbitrary timezone through a TZ environment variable, it would need to install the tzdata package, which weighs in at 3.3MB and would add ~20% on top of the current image size, so I would like to avoid this in case it's possible.
Thanks.
Don't know why I didn't think of that.
I totally see your point with the increased size.
I can confirm that using the host time cron then runs at expected time as is on the host.
I can see that it runs with default UTC time.
This makes it difficult to time everything to specific local times (especially with daylight saving)
I suggest adding support for setting the timezone it runs under in the environment
The text was updated successfully, but these errors were encountered: