Timezone Troubles

I’ve been trying to setup timezones but it does not seem to work.
Following this, I tried creating an environment variable “TIMEZONE” with value “Europe/Berlin”. That did not seem to have any effect. It feels like a really obvious thing to be able to do, but it seems that I’m missing something. I’d appreciate any pointers.

Using:

  • balenaOS 2.47.0+rev1
  • RPi 3

How exactly did you follow the balena-timezone example?

It gives a script, start.sh, whose code writes the contents of TIMEZONE to /etc/timezone and calls an OS-level update. The script does not exist in other containers unless you add it. Is it being called? If so, are you seeing any errors in the container logs when those two lines run?

This repository illustrates configuring the timezone for an application not the OS (host). On Balena, each application is it’s own docker container so this example would have to be applied to each application’s dockerfile that would like a different TIMEZONE than UTC. We have https://github.com/balena-io/docker-masterclass/ that can help explain how we use docker for applications.

Can you better describe how you’re testing if the timezone is correctly being changed? Is there a specific command or programming language you’re using ?

Hi there,

I wanted to circle back here and see if you had any luck setting the local timezone in your container. If you are still having issues, please do reach out again!