Jeeaaasus / youtube-dl

Automated yt-dlp Docker image
https://hub.docker.com/r/jeeaaasustest/youtube-dl/
MIT License
258 stars 33 forks source link

Setting timezone does not work #74

Closed notDavid closed 2 years ago

notDavid commented 2 years ago

Hi there, fyi the TZ environment variable does not work for me. I double checked and it seem to be set correctly...? The time in the log is 2 hours early...

$ docker compose logs --timestamps --since=1m
youtube-dl-test  | 2022-07-06T07:28:04.196630596Z 2022-07-06 09:28:04 - execution took 1 seconds
youtube-dl-test  | 2022-07-06T07:28:04.196637096Z yt-dlp version: 2022.06.29
youtube-dl-test  | 2022-07-06T07:28:04.196638721Z waiting 3h..
$ date
Wed Jul  6 09:28:10 CEST 2022
docker-compose.yml ```yml --- version: '3.3' services: youtube-dl: container_name: youtube-dl-test image: jeeaaasustest/youtube-dl:unstable volumes: - './data/config:/config' - './data/downloads:/downloads' networks: - web restart: unless-stopped # labels: # com.centurylinklabs.watchtower.enable: true environment: TZ: Europe/Amsterdam youtubedl_debug: true networks: web: driver: bridge ```
docker inspect youtube-dl-test ```log ... "Config": { "Hostname": "3a82c6dc1811", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "8080/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "TZ=Europe/Amsterdam", "youtubedl_debug=true", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "S6_BEHAVIOUR_IF_STAGE2_FAILS=2", "PUID=911", "PGID=911", "UMASK=022", "youtubedl_lockfile=false", "youtubedl_webui=false", "youtubedl_webuiport=8080", "youtubedl_cookies=false", "youtubedl_subscriptions=false", "youtubedl_watchlater=false", "youtubedl_interval=3h", "youtubedl_quality=1080" ], ... ```
Jeeaaasus commented 2 years ago

hmm, maybe I'm derping but isn't Europe/Amsterdam CEST? 😄

Changing TZ works in my container.

notDavid commented 2 years ago

You are right @Jeeaaasus... i found the issue, it seems to be a limitation of the Docker daemon which shows times in UTC and you can't change it 🙂

notDavid commented 2 years ago

Fyi: https://github.com/docker/cli/issues/604