QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
532 stars 46 forks source link

hwclock values are different in Heads and QubesOS on Thinkpad T430 #8033

Closed almazyan closed 1 year ago

almazyan commented 1 year ago

How to file a helpful issue

Qubes OS release

R4.1.1

Brief summary

hwclock command in the recovery shell in Heads shows different time than in dom0 in QubesOS. The difference is one hour. In the recovery shell it is one hour ahead than in dom0. For example, in the recovery shell it is 20:00:00 and in dom0 it shows 21:00:00.

I tried to change the time in both shells. Change is possible but there is always one hour difference.

Steps to reproduce

type hwclock in recovery shell in Heads

than go to QubesOS and type hwclock in dom0

Expected behavior

hwclock should show the same value in the recovery shell of Heads and in dom0 of QubesOS

Actual behavior

hwclock in the recovery shell is one hour ahead than hwclock in dom0.

marmarek commented 1 year ago

hwclock shows time in your local timezone (the one you have set on the system), see man hwclock. Heads has timezone set to UTC, regardless of what you set in dom0. So, the difference is expected.

andrewdavidwong commented 1 year ago

Closed as "not a bug" (the reported behavior is not a bug and is already working as intended). If anyone believes this is a mistake, please leave a comment, and we'll be happy to take another look. Thank you.

almazyan commented 1 year ago

It is really confusing.

Why does hwclock -u in dom0 show localtime and hwclock -l show UTC? It should be other way around, shouldn't it? Why hwclock -w or hwclock --systohc don't modify the hardware clock to show the same as timedatectl status?

I'm not an expert but I read somewhere in internet long time ago that the difference of BIOS time and the system time is a symptom of bootkit/rootkit or some kind of vulnerability for Windows. Maybe it is not an issue for Heads/Qubes. But for the sake of my sanity, how can I modify hwclock so it shows the same as timedatectl status? Screenshot_2023-02-14_10-34-52

marmarek commented 1 year ago

Check hwclock man page, really. The options you use mean different thing than you think (they are about what timezone your RTC is set, not what to display).

andrewdavidwong commented 1 year ago

Please note that the issue tracker (qubes-issues) is not intended to be a place for fielding questions. Instead, we have other venues meant for asking questions, asking for help, and having discussions. (By contrast, the issue tracker is more of a technical tool intended to support our developers in their work.) Thank you for your understanding!