Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-Compose: Container timezone incorrect #213

Closed
1 task done
PhrantiK opened this issue Apr 1, 2024 · 0 comments · Fixed by #215
Closed
1 task done

Docker-Compose: Container timezone incorrect #213

PhrantiK opened this issue Apr 1, 2024 · 0 comments · Fixed by #215
Assignees
Labels
bug Something isn't working
Milestone

Comments

@PhrantiK
Copy link

PhrantiK commented Apr 1, 2024

Is there already an issue for your problem?

  • I have checked older issues, open and closed

NZBGet Version

v23-stable

Platform

Linux/Docker

Environment

Running in Docker using Compose

Current Behavior

Timezone doesn't change in container when using TZ env variable with docker-compose. The scheduler uses the container timezone which makes things tricky to manage.

docker exec -u root:root -it nzbget /bin/sh

/ # echo $TZ
America/Los_Angeles
/ # date
Mon Apr  1 17:03:53 UTC 2024
/ #

Expected Behavior

Container timezone to reflect the env variable.

Steps To Reproduce

No response

Logs

No response

Extra information

re: gliderlabs/docker-alpine#136

Adding the tzdata package to the container makes the env variable work:

/ # date
Mon Apr  1 10:11:24 PDT 2024
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 11994e2..3f0d34d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -58,7 +58,7 @@ LABEL maintainer="nzbget@nzbget.com"
 ENV TERM linux
 RUN \
   echo "**** install packages ****" && \
-  apk add --no-cache --update shadow libxml2 libxslt openssl p7zip python3 boost1.82-json && \
+  apk add --no-cache --update shadow libxml2 libxslt openssl p7zip python3 boost1.82-json tzdata && \
   ln -sf /usr/bin/python3 /usr/bin/python && \
   echo "**** cleanup ****" && \
   rm -rf /root/.cache /root/.cargo /tmp/*
@PhrantiK PhrantiK added the bug Something isn't working label Apr 1, 2024
@luckedea luckedea added this to the v24 milestone Apr 1, 2024
@phnzb phnzb linked a pull request Apr 2, 2024 that will close this issue
@phnzb phnzb closed this as completed in #215 Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants