Skip to content

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

Open

Description

@UBA-NE

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

Activity

  1. Snck3rs commented on Dec 11, 2024

    @Snck3rs

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions