Wrong timezone in VMs: where the value for qubesdb-read /qubes-timezone comes from? (Take two)

67 views
Skip to first unread message

Pablo Di Noto

unread,
Apr 30, 2018, 8:18:12 PM4/30/18
to qubes-users
Hello all,

I asked this question when Qubes R3.2 was out, and solved with help from Andrew in a somewhat weird way (running local scripts on each AppVM).

Now that we are at R4.0, I am again having this issue:

After install, dom0 gets proper timezone:

| [root@dom0 Desktop]# timedatectl
| Local time: Mon 2018-04-30 21:12:20 -03
| Universal time: Tue 2018-05-01 00:12:20 UTC
| RTC time: Tue 2018-05-01 00:12:20
| Time zone: America/Argentina/Cordoba (-03, -0300)
| Network time on: no
| NTP synchronized: no
| RTC in local TZ: no

but for some reason, all AppVM get the wrong timezone on their configuration script:

| user@p-vault:~/p-vault$ ls -l /etc/localtime
| lrwxrwxrwx 1 root root 39 Apr 30 23:32 /etc/localtime -> ../usr/share/zoneinfo/Argentina/Cordoba

which of course does not exists, so all AppVM end up in GMT.

So my original question is back: Where does that value come from?
And the obvious next one: How can I change it to a proper "America/Argentina/Cordoba"?

Thanks!

Ivan Mitev

unread,
May 1, 2018, 12:13:17 AM5/1/18
to qubes...@googlegroups.com
Hi,
/usr/lib/qubes/init/qubes-early-vm-config.sh

the script gets the timezone from dom0 with `qubesdb-read
/qubes-timezone` and sets it early during a VM's boot.

see this post/thread for more details:

https://www.mail-archive.com/qubes...@googlegroups.com/msg21693.html


> And the obvious next one: How can I change it to a proper "America/Argentina/Cordoba"?
I tried to set a different timezone in dom0 but qubesdb-read would
return the old value in VMs ; I don't know how the db is updated (a
reboot would probably do but it seems overkill and I have too much stuff
open to test).

But if you're rebooted already and you still get the wrong string in
VMs, maybe it's a bug in how qubesdb-read reads the timezone
(interestingly, that's the first time I see 3 fields like 'X/Y/Z' - I
always thought a timezone would be 'X/Y').

>
> Thanks!
>

Pablo Di Noto

unread,
May 1, 2018, 3:09:37 AM5/1/18
to Ivan Mitev, qubes-users

Hello Ivan, 

El mar., 1 may. 2018 01:13, Ivan Mitev <iv...@maa.bz> escribió:
Hi,

On 05/01/2018 03:18 AM, Pablo Di Noto wrote:
> Hello all,
>
> I asked this question when Qubes R3.2 was out, and solved with help from Andrew in a somewhat weird way (running local scripts on each AppVM).
>
> Now that we are at R4.0, I am again having this issue:
>
> After install, dom0 gets proper timezone:
>
> |    [root@dom0 Desktop]# timedatectl
> |          Local time: Mon 2018-04-30 21:12:20 -03
> |      Universal time: Tue 2018-05-01 00:12:20 UTC
> |            RTC time: Tue 2018-05-01 00:12:20
> |           Time zone: America/Argentina/Cordoba (-03, -0300)
> |     Network time on: no
> |    NTP synchronized: no
> |     RTC in local TZ: no
>
> but for some reason, all AppVM get the wrong timezone on their configuration script:
>
> |    user@p-vault:~/p-vault$ ls -l /etc/localtime
> |    lrwxrwxrwx 1 root root 39 Apr 30 23:32 /etc/localtime -> ../usr/share/zoneinfo/Argentina/Cordoba
>
> which of course does not exists, so all AppVM end up in GMT.
>
> So my original question is back: Where does that value come from?
/usr/lib/qubes/init/qubes-early-vm-config.sh

Yes, I see it.

That is why I was after the source of  the "Argentina/Cordoba" as answer to "qubesdb-read /qubes-timezone" on any AppVM.

For some reason, despite dom0 has proper "America/Argentina/Cordoba" timezone after a clean install, AppVMs get "Argentina/Cordoba" when they ask dom0.

Will check qubesdb code to see if there is some hardcoded regexp that is asuming timezones are only "xxxx" or "xxxx/yyyy" break when it is three item "xxxx/yyyy/zzzz"

Regards,
///Pablo
Reply all
Reply to author
Forward
0 new messages