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

Add tzdata package #33

Closed
prilka opened this issue Mar 27, 2018 · 8 comments

Comments

@prilka
Copy link

commented Mar 27, 2018

It's not possible to change the timezone via TZ-Env due to missing tzdata package.

Adding apk add --no-cache tzdata to your Dockerfile should fix the problem.

I think this was also the problem in #29

@funkyfuture

This comment has been minimized.

Copy link
Owner

commented Mar 27, 2018

could you please elaborate what your issue is when you use the TIMEZONE environment variable?

@prilka

This comment has been minimized.

Copy link
Author

commented Mar 29, 2018

the TIMEZONE env works well for the scheduling. But the timezone is not set for the container-system. A simple docker exec ..... date will not print the expected date. This leads to wrong dates in docker logs.

@funkyfuture

This comment has been minimized.

Copy link
Owner

commented May 20, 2018

if i'm getting what you're aiming at, i don't understand how adding tzdata to the scheduling container would help with it.

@funkyfuture

This comment has been minimized.

Copy link
Owner

commented Jun 10, 2018

i'm closing the issue for now.

@TatzyXY

This comment has been minimized.

Copy link

commented Sep 18, 2018

The problem still exists and @prilka statement is right. The env. var TZ does not work.
Your container generally does work well and schedules to the right time but the missing env var TZ leads to some unexpected issues.

@funkyfuture

This comment has been minimized.

Copy link
Owner

commented Sep 18, 2018

@TatzyXY which version are you referring to?

@TatzyXY

This comment has been minimized.

Copy link

commented Sep 19, 2018

@funkyfuture Latest version because in the latest release the following line is still missing:

apk add --no-cache tzdata

in the File: https://github.com/funkyfuture/deck-chores/blob/master/Dockerfile


Enter these lines in your terminal and you can see the issue:

docker run --rm -it -e TIMEZONE='Europe/Berlin' -e TZ='Europe/Berlin' funkyfuture/deck-chores sh

Then enter date in the interactive shell. You will see the wrong date if you are not living in UTC.

As you can see I use your TIMEZONE-Env. This Env is used to schedule the jobs and this works well.
But all other features of linux do not use your TIMEZONE-Env.

Because of that I set in the container the standardized Env-Var: TZ as well. But this has no effect because of the missing package mentioned above. I think adding tzdata would fix this issue as well: #29

Try the same with other containers like debian

docker run --rm -it TZ='Europe/Berlin' debian sh
date

You will see the right output.

@funkyfuture

This comment has been minimized.

Copy link
Owner

commented Oct 18, 2018

@TatzyXY thank you very much for your investigation. would you be so kind an open a PR?

@funkyfuture funkyfuture reopened this Oct 18, 2018

@funkyfuture funkyfuture added bug and removed feedback pending labels Oct 18, 2018

@funkyfuture funkyfuture added this to the 0.3 milestone Oct 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.