Change timezone. timedatectl reverts to default after a restart/shutdown template

I’m trying to change timezone using these commands in kicksecure-18 template or root (qvm-run -u root kicksecure-18 qterminal):

sudo dpkg-reconfigure tzdata

dpkg-reconfigure tzdata

timedatectl set-timezone Etc/UTC

Then timedatectl status shows new timezone, but then timezone reverts to default after a restart/shutdown template. @arraybolt3 help please

Qubes OS syncs the time and timezone of all VMs to the same as dom0. The easiest way to change the timezone to UTC would be to set the timezone in dom0 to UTC.

If you really want to set the timezone for just this one VM, the best options is probably to add a command to set the timezone to /rw/config/rc.local. See:

If for some reason setting the timezone afresh on every VM boot is undesirable, there’s another (probably undocumented) solution; create a file at /etc/qubes/protected-files.d/user.conf with the following contents :

/etc/timezone

That will suppress the functionality that syncs dom0’s timezone to individual qubes. That will make your timedatectl settings stick. (This is the mechanism Whonix uses internally to make sure its timezone stays set to UTC, so it’s probably not going anywhere unless /etc/protected-files.d gets replaced with some other mechanism in the future.)

4 Likes

Thanks!