GreenFrogSB / LMDS

LMDS - Linux Media Delivery System
https://greenfrognest.com
GNU General Public License v3.0
210 stars 45 forks source link

time in containers is 1 hour behind #49

Closed chenks closed 2 years ago

chenks commented 2 years ago

i've noticed that the time inside all the created containers are 1 hour behind the actual time here.

example, i connected to the console on the radarr and sonarr containers and ran

root@a025bc58ebd4:/#date
Fri Aug  5 08:05:32 UTC 2022

the current time here is 09:05m which at the moment is GMT+1 (or BST).

now, i could just manually adjust the time in each container, but then i guess the next time the clocks change it'll be wrong again. is there something system wide i can do so that the containers are always at the correct time?

The time set on the Pi is correct. and it set to the correct timezone

GreenFrogSB commented 2 years ago

This won't be easy to fix globally as some of the containers do not even have tzdata package installed, but the ones that have offer an environmental variable to be set according to your time zone.

What does that mean?

When you open /LMDS/docker-compose.yml file you will see containers definition there, some of them have "TZ=UTC" you could change that to i.e. "TZ=Europe/London" - depending on where you are, save it and run "docker-compose up -d" again, this will rebuild container setting your timezone on the container.

I would suggest you research timezoning on Docker as there is more to that than I just wrote above.

chenks commented 2 years ago

I suppose the question is does it matter what the time zone is inside the container?

Example, if I set a schedule within sabnzbd will that schedule use the current time (set on the pi) or the wrong time (set in the container)

GreenFrogSB commented 2 years ago

It does not matter that much but the schedule set on the container will use container time.

On Fri, Aug 19, 2022 at 8:49 AM chenks @.***> wrote:

I suppose the question is does it matter what the time zone is inside the container?

Example, if I set a schedule within sabnzbd will that schedule use the current time (set on the pi) or the wrong time (set in the container)

— Reply to this email directly, view it on GitHub https://github.com/GreenFrogSB/LMDS/issues/49#issuecomment-1220361858, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARFVEPTAS77HXKUNA3ZWKALVZ44BDANCNFSM55VGKRNA . You are receiving this because you commented.Message ID: @.***>

chenks commented 2 years ago

i changed the TZ in all the containers i have running to Europe/London using portainer to edit the container variables then re-deploy it from protainer.