huan / docker-simple-mail-forwarder

Simplest and Smallest Email Forward Service based on Docker.

Home Page:https://hub.docker.com/r/zixia/simple-mail-forwarder/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Timezone support

me1299 opened this issue · comments

It would be nice to set the correct timezone for the docker container. Now my log files are not in sync with the actual time making it harder to debug.

Time zone data package tzdata could be included in the container.

Yes, we should.

And actually, we have already support it by setting the TZ environment by the docket -e to change the timezone inside the container.

However, we have not document it in the README yet.

Would you like to add a section to the README for the timezone support? A PR will be very welcome.

Hi Huan,

This is actually not working for me. I've set the timezone in my docker compose file.
Within the docker container:

echo $TZ
Europe/Amsterdam

So the TZ variable is available, but after requesting the time:

date
Thu Jun 6 10:11:12 UTC 2019

It's 2 hours of.
Amsterdam is UTC+1 (+2 with daylight savings)

@me1299 Yes, you are right.

I had just tested in the docker container and it not worked.

I believe we should add tzdata to the docker image as you suggested.

Would you like to send a PR to fix this problem? Thank you very much.

@huan Consider it done ;)

The latest docker image had been published, please let me know if it works or not.

Thanks for your contribution!

Hi Huan,

It's working!

Glad to hear that, Cheers! 🍻

@me1299 One more thing:

Would you like to add one-line documentation of how to set the timezone with TZ environment variable in README? Because that would help other developers a lot when they need this feature.