void-docs
void-docs copied to clipboard
Date and Time: clarify localtime settings (TIMEZONE is required for localtime)
There have been multiple reports in IRC about localtime settings not working.
I was able to get this working by setting BOTH /etc/localtime and TIMEZONE="US/Central" in rc.conf
, while the comments in rc.conf
imply that you should set either /etc/localtime (preferred) OR TIMEZONE.
I have not had my coffee yet and @Duncaen understands what is happening better than I do. I just want to make sure the issue is documented.
I'm not sure if we should document this or fix the script instead, TIMEZONE
in /etc/rc.conf
will link /etc/localtime
on each boot, changing the timezone will require updating both if you don't want to reboot.
I generally prefer just having one place where the timezone is set and that is by linking /etc/localtime
.
The issue is that tzset(3)
defaults to utc if the TZ
environment variable is set and empty, /etc/runit/core-services/03-console-setup.sh
always sets TZ=$TIMEZONE
when it runs hwclock
if $HARDWARECLOCK
is set.
This sounds like a better solution to me 👍
On Thu, Dec 23, 2021 at 8:01 AM Duncan Overbruck @.***> wrote:
I'm not sure if we should document this or fix the script instead, TIMEZONE in /etc/rc.conf will link /etc/localtime on each boot, changing the timezone will require updating both if you don't want to reboot. I generally prefer just having one place where the timezone is set and that is by linking /etc/localtime.
— Reply to this email directly, view it on GitHub https://github.com/void-linux/void-docs/issues/633#issuecomment-1000324560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWHGI5SSU7HUX6MDVYU43USMTRZANCNFSM5KU2YDJQ . You are receiving this because you authored the thread.Message ID: @.***>