void-docs icon indicating copy to clipboard operation
void-docs copied to clipboard

Clarity on rc.conf when setting timezone

Open kintarowonders opened this issue 3 years ago • 1 comments

I created a new Void Linux system and the installer did not have UTC as an option and all of it's timezone options in the installer are region based. I decided to change this detail later.

So I searched for how to change the timezone on Void Linux and was led to the documentation.

I changed the symlink in /etc/localtime to /usr/share/zoneinfo/UTC like the documentation states and then I rebooted, partly to be sure it was persistent. When I booted back up I was still in the timezone I picked in the installer. I decided to investigate and found out that the documentation is wrong, and that the timezone symlink is set on boot.

To actually change the timezone one must change the TIMEZONE variable in /etc/rc.conf and the documented should be updated to reflect this. I had to find this using grep. Clarity with the role of /etc/rc.conf in timezones would help newbies.

kintarowonders avatar Jul 14 '22 09:07 kintarowonders

The installer should be changed, using /etc/localtime directly is a lot simpler, easier to get right with tab complete and doesn't require a reboot just for /etc/rc.conf to recreate the symlink. Thats why only /etc/localtime is documented, that the installer uses /etc/rc.conf is unfortunate and we should probably add that this should be document to unset that and change the installer to create the symlink instead of changing /etc/rc.conf.

https://github.com/void-linux/void-runit/pull/40 for previous discussions and the history on the note in /etc/rc.local.

Duncaen avatar Jul 14 '22 10:07 Duncaen

https://github.com/void-linux/void-mklive/pull/269

classabbyamp avatar May 01 '23 07:05 classabbyamp