I'm using this with UNRAID. The docker run command includes the -e TZ="America/New_York" environment variable and yet the container ignores it and thinks it is in UTC timezone.
# date
Fri Mar 12 21:13:25 UTC 2021
It was only after I installed tzdata using apk add tzdata that it then worked:
# apk add tzdata
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/1) Installing tzdata (2020a-r0)
Executing busybox-1.28.4-r3.trigger
OK: 21 MiB in 31 packages
/usr/share # date
Fri Mar 12 16:15:05 EST 2021
The long-term solution is for the Dockerfile to include the line:
I'm using this with UNRAID. The docker run command includes the
-e TZ="America/New_York"
environment variable and yet the container ignores it and thinks it is in UTC timezone.It was only after I installed
tzdata
usingapk add tzdata
that it then worked:The long-term solution is for the Dockerfile to include the line: