vmware / powerclicore

PowerCLI Core Dockerfile
Apache License 2.0
97 stars 48 forks source link

ENV TZ= in DockerFile does not change time #65

Closed JesseDarr closed 2 years ago

JesseDarr commented 2 years ago

Describe the bug

Setting a time zone in a DockerFile doesn't change the time, but it does change the listed time zone in the container. ENV TZ="America/Chicago"

sh-4.4# date -u Wed Jan 26 13:45:27 UTC 2022

sh-4.4# date Wed Jan 26 13:45:29 America 2022

Reproduction steps

1. Edit Time zone via DockerFile
2. Test with "date" and "date -u"
3.
...

Expected behavior

The date command should return an adjusted time value, instead of the UTC value with the listed time zone changed.

Additional context

No response

nklinkachevAtVMware commented 2 years ago

I've updated the docker file to now install the tzdata package. Setting timezones now should work as expected.