Yesterday I set up a Windows AppVM, which will allow me to run the ~2
Windows applications I occasionally need without having to reboot my
laptop to Windows or carry a separate Microsoft Surface with me. (I'm
thrilled!) But I had trouble getting the time correct in the AppVM.
I want to use Eastern Time (currently -0500). I tried various
combinations of RealTimeIsUniversal and the "timezone" pref on the VM,
but no matter what I did, after every reboot, the time would be 5 hours
ahead of Dom0, as if something were misinterpreting UTC as local time.
Finally I watched the VM clock carefully and noticed that in some cases
it became wrong a second or two _after_ boot, and I looked in the
Windows event log to see what was changing it. The offender was
C:\Windows\System32\liteagent.exe, part of the Qubes Windows tools. I
was able to find the source code for the part that changes the time at
https://github.com/QubesOS/qubes-vmm-xen-win-pvdrivers-xeniface/blob/d475aa6e74dbefd4e850b2b5123793f97e49a2b3/src/win32stubagent/XService.cpp . I don't fully understand how this tool is supposed to work and wasn't able to find relevant information on the web, but I noticed that it reads two registry keys to check whether the "host time" is UTC. After I set _both_ of those keys, the problem went away. For reasons I don't understand based on reading the source code, setting only HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\XenTools\HostTime was not enough.
Has anyone else seen this problem, or are there things I could check to
understand why I might be affected when others are not?
Thanks,
Matt