Commit fe3bfc6
committed
core-services/03-console-setup.sh: respect localtime hwclock
When TIMEZONE was unset or empty, the resulting empty TZ variable in
the environment caused hwclock to set the timezone to UTC and ignore
the value of /etc/localtime. Only set TZ when TIMEZONE is non-empty.
Thanks to quinq in #voidlinux for finding the root cause of the bug.
hwclock(8):
The system timezone is configured by the TZ environment variable
or the /etc/localtime file, as tzset(3) would interpret them.
tzset(3):
If the TZ variable does appear in the environment, but its value
is empty, or its value cannot be interpreted using any of the
formats specified below, then Coordinated Universal Time (UTC)
is used.
Fixes: 6394a10 (core-services/02-console-setup.sh: setup HARDWARECLOCK if set.)1 parent 5b18be1 commit fe3bfc6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
0 commit comments