Closed zehnm closed 3 years ago
My current understanding: timedatectl
is a systemd utility, which requires /etc/localtime
to be a symlink to the timezone information. The /etc/timezone
file is mostly a "Debian thing". Setting a new timezone with timedatectl
only sets a new symlink and leaves /etc/localtime
untouched.
More information:
Options:
# date
Tue Feb 2 18:00:51 CET 2021
# export TZ=UTC
# date
Tue Feb 2 17:01:04 UTC 2021
# export TZ=US/Hawaii
# date
Tue Feb 2 07:01:38 HST 2021
timedatectl
can be used. Options:
Setting the TZ variable in /opt/yio/app-launch.sh works fine. I think this is the easiest way to make the timezone user configurable with a read-only root filesystem and leaving systemd untouched.
Alternatively a profile.d entry with a bind-mount could be used.
Description
After introducing the read-only root file system, the timezone can no longer be set with
timedatectl set-timezone
.How to Reproduce
Steps to reproduce the behavior:
timedatectl set-timezone UTC
date
: back to CESTExpected behavior
Timezone can be set and is persisted during reboots.
Your Environment
Additional context
The
/etc
file system overlay is only an in-memory overlay which is not persisted during reboots.