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

is it possible to change the timezone of the cron container? #61

Open
UBA-NE opened this issue Aug 18, 2023 · 1 comment
Open

is it possible to change the timezone of the cron container? #61

UBA-NE opened this issue Aug 18, 2023 · 1 comment

Comments

@UBA-NE
Copy link

UBA-NE commented Aug 18, 2023

I've tried using an environment variable, which sees to change the timezone, but the time is still off by two hours in my container.

environment:
- TZ=CET

@Snck3rs
Copy link

Snck3rs commented Dec 11, 2024

I know this issue is a year old, but maybe someone has the same problem. To change the timezone of the container, you have also to install tzdata inside the container.

So your custom Dockerfile would be something like this:

FROM willfarrell/crontab

RUN apk add --no-cache tzdata

Then you can set the timezone via the TZ environment variable.

@willfarrell maybe it would be useful to install tzdata by default as timezone issues could be common when it comes to specific cron times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants