Before submitting a bug please read:
App Version
1.1.1+94ff7ed.94ff7ed
Zwavejs Version
6.3.0-8f22052
Build/Run method
I use the following in docker-compose to ensure the containers time matches the host.
volumes:
- ./store:/usr/src/app/store
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
This is correctly setting the date and time inside the container - confirmed by attaching to container and issuing the date command.
However logs now seem to be in UTC rather than local time.
This was working on 6.2.0 and 1.1.0
Steps to reproduce the behavior:
Logs should be in local time as per previous builds, this appears to be regression.
Previous working scenario was with pre-built docker hub master image, not ones i have built using the provided docker contrib file..
hmm adding this worked (as it is another solution to TZ)
What I don't get is why this wasn't needed on the containers for the last week or so, but is now.
I will retest once next official dockerhub master comes out and see if it is new behavior or dependent on build process.
Unless how logging picks it time was changed recently in a commit - aka it used to use the containers time but now it explicitly looks for the TZ env var?)
environment:
- TZ=America/Los_Angeles
The TZ var has always been there in Docker containers
i know, i think i didn't explain myself
The TZ is a fine workaround to a regression i am observing.
On master container from 4 days ago
```
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
````
works to set time zone for container AND logging was using this time
on the containers i built using Dockerfile.contrib it works to set the timezone in the container but logging ignores container time and uses UTC.
on the containers i built using Dockerfile.contrib it works to set the timezone in the container but logging ignores container time and uses UTC.
That file is to build images for testing purposes and it's not really maintained, @larstobi look at this if you want/have time, nothing so important btw :)
I think using the TZ variable is not only a workaround, but the correct solution. :-)
coo & thanks, glad i got an explanation :-), i don't need it to work in the contrib built images.
@larstobi i like the file mapping as in a pre-defined docker-compose it works for just about every linux system without need for folks to go find their TZ variable format (and we have a lot of beginners coming through - like me)
but happy to snap to TZ as that seems to be the consensus, i can add TZ to our example docker-compose in the repo if that works for folks?
i can add TZ to our example docker-compose in the repo if that works for folks?
Great idea! 馃槉
@scyto Go for it! Thanks :)
Most helpful comment
I think using the TZ variable is not only a workaround, but the correct solution. :-)