Forceu / Gokapi

Lightweight selfhosted Firefox Send alternative without public upload. AWS S3 supported.
GNU Affero General Public License v3.0
1.71k stars 69 forks source link

[Bug] TZ Environment Variable Not Working in Docker #185

Closed adripo closed 4 months ago

adripo commented 4 months ago

Description:

According to the documentation, the TZ environment variable can be set to specify the timezone when starting the Docker container. However, this does not seem to work as expected.

Steps to Reproduce:

  1. Run the following Docker command:
    docker run -v gokapi-data:/app/data -v gokapi-config:/app/config -p 127.0.0.1:53842:53842 -e TZ=UTC f0rc3/gokapi:latest
  2. Check the timezone settings inside the running container.

Expected Behavior:

The container should use the specified timezone (e.g., UTC or Europe/Berlin) as set by the TZ environment variable.

Actual Behavior:

The container does not reflect the timezone set by the TZ environment variable.

Additional Information:

For reference, here is the relevant section of the documentation:

To start the container, run the following command:

docker run -v gokapi-data:/app/data -v gokapi-config:/app/config -p 127.0.0.1:53842:53842 -e TZ=UTC f0rc3/gokapi:latest

... Set -e TZ=UTC to the timezone you are in, e.g., -e TZ=Europe/Berlin.

Thank you for looking into this issue.

adripo commented 4 months ago

I just saw that the issue is solved in development https://github.com/Forceu/Gokapi/commit/507c7b5d941a19c00c6cfbff94e48e0161d9ae43

Forceu commented 4 months ago

Thank you, and yes you are right, it has been fixed. I am currently working on Redis support and once that is finished I will release the new version with the fix. In the meantime you can use the tag latest-dev, which should be already stable enough for daily use or you install tzdata manually in the container