With the clocks going forward last night I woke up this morning and my players were displaying as an hour behind. Is there a recommended/proper way to fix this? I can add an environment variable "TZ" and set the value as "Europe/London" which seems to work, but is that all that is needed?
Announcement
Collapse
No announcement yet.
Setting time on Docker LMS
Collapse
X
-
Similar but different here
Similar here - using Docker and a late March build of 8.2.0. Time is correct on 2 x Touch units (so they have gone on to British Summer Time) but my Boom is still on GMT, so an hour behind. That has got me confused.
If I connect the Boom to mySqueezebox.com, the time is correct but through LMS (running on a Synology DS218+), the time reverts to GMT.
Any clues folks? TIA
-
Well.. I tried it based on post on other thread and it seems to work for Gui docker in synology . Is it correct best way? I don't know.
DOCKER > details > terminal >create > click on bash>when command prompt type: /usr/bin/tzselect >press enter
Select correct time zone..
(take note of what docker TZ variable is (like Europe/London)) ..
Stop container > edit >environment >+ >in variable colum type TZ > in value column type Europe/London >apply
Start container
Set alarm clock in next 2min to verify if it works
PS I don't know if all terminal part of above steps is only to find out what to put into TZ.. Perhaps that's the case and just adding eviroment variable TZ is enough... [emoji848]Last edited by Jaca; 2021-03-28, 14:24.3x Squeezebox Touch, 4x Squeezebox Radio, Squeezelite (RPi 3B with HiFiBerry DAC+Pro on OSMC), Material Skin Apk, Squeeze Commander, Logitech Media Server Version: 8.2.0 with Material Skin (Docker in DS218+)
- Likes 1
Comment
-
Fairly sure setting TZ as an environment variable will work well.
That said, as a habit, if I have containers that I want to track the underlaying *NIX hosts timezone I do the following. It's also what I do with my LMS container and it seems to have worked so far.
Setup 2 read only bind volumes for the containers pointing at the hosts /etc/localtime and /etc/timezone as below (if using the command line, adapt as needed if using a Docker GUI of some sort).
Code:-v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro
Before:
Code:[email protected]:/config# date Mon Mar 29 13:24:30 UTC 2021
Code:[email protected]:/config# date Mon Mar 29 14:26:58 BST 2021
For anyone that cares, /etc/timezone is a text representation of the timezone configured, and /etc/localtime is the binary rules used to calculate the time from said timezone.
Comment
-
Probably worth noting that GMT and UTC are not the same, even though in winter they do map to the same time value. To enable local time in *nix you need to copy `/usr/share/zoneinfo/<timezonestring>` to /etc/localtime. Depending on the application it may also perform its own timezone management, referencing either /etc/timezone for the system wide setting of timezonestring or a private config file (e.g. php does that).
Comment
-
Originally posted by gordonb3 View PostProbably worth noting that GMT and UTC are not the same, even though in winter they do map to the same time value. To enable local time in *nix you need to copy `/usr/share/zoneinfo/<timezonestring>` to /etc/localtime. Depending on the application it may also perform its own timezone management, referencing either /etc/timezone for the system wide setting of timezonestring or a private config file (e.g. php does that).
Sent from my Pixel 3a using TapatalkLiving Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
Bedroom: Radio
Bathroom: Radio
Comment
-
Originally posted by Jaca View PostWell.. I tried it based on post on other thread and it seems to work for Gui docker in synology . Is it correct best way? I don't know.
DOCKER > details > terminal >create > click on bash>when command prompt type: /usr/bin/tzselect >press enter
Select correct time zone..
(take note of what docker TZ variable is (like Europe/London)) ..
Stop container > edit >environment >+ >in variable colum type TZ > in value column type Europe/London >apply
Start container
Set alarm clock in next 2min to verify if it works
PS I don't know if all terminal part of above steps is only to find out what to put into TZ.. Perhaps that's the case and just adding eviroment variable TZ is enough... [emoji848]
Comment
-
Originally posted by DJWillis View PostFairly sure setting TZ as an environment variable will work well.
That said, as a habit, if I have containers that I want to track the underlaying *NIX hosts timezone I do the following. It's also what I do with my LMS container and it seems to have worked so far.
Setup 2 read only bind volumes for the containers pointing at the hosts /etc/localtime and /etc/timezone as below (if using the command line, adapt as needed if using a Docker GUI of some sort).
Code:-v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro
Before:
Code:[email protected]:/config# date Mon Mar 29 13:24:30 UTC 2021
Code:[email protected]:/config# date Mon Mar 29 14:26:58 BST 2021
For anyone that cares, /etc/timezone is a text representation of the timezone configured, and /etc/localtime is the binary rules used to calculate the time from said timezone.
Comment
-
a good way would be to set a symbolic link to the /etc files in a location which is seen by synology eg /volume1/docker.....
then you have to still create the docker in command line, but after this you can admin via GUI and didn't loose the timezone mappings if you recreate the docker container
or of course you look into portainer....
Comment
-
Originally posted by mamema View Posta good way would be to set a symbolic link to the /etc files in a location which is seen by synology eg /volume1/docker.....
then you have to still create the docker in command line, but after this you can admin via GUI and didn't loose the timezone mappings if you recreate the docker container
or of course you look into portainer....
I may just very well go to portainer as I have used it before on another system....Thanks.
Comment
-
Originally posted by sharkfist View PostWith the clocks going forward last night I woke up this morning and my players were displaying as an hour behind. Is there a recommended/proper way to fix this? I can add an environment variable "TZ" and set the value as "Europe/London" which seems to work, but is that all that is needed?
Comment
-
Originally posted by Edward Lowy View PostThanks Jaca -this resolved my issue. I don't quite understand why my Touch's correctly adjusted to BST with no intervention, but the Boom needed this update to change to BST.
Comment
Comment