pub enum RtcInterpretation {
Utc,
LocalTime,
}Expand description
How a guest’s userland reads the hardware clock.
This is the whole bug, as a two-variant enum. The hypervisor’s RTC holds UTC in both cases.
Variants§
Utc
An ordinary distro: /etc/adjtime says UTC, systemd-timedated
agrees, and the wall clock is right. The front.
LocalTime
gunnar as PID 1: no systemd-timedated, no /etc/adjtime, nothing that
establishes what the RTC holds — so it is read as local time and the
wall clock lands one timezone offset ahead. The appliance.
Implementations§
Source§impl RtcInterpretation
impl RtcInterpretation
Sourcepub fn skew_ms(self, zone: &str, unix_secs: i64) -> i64
pub fn skew_ms(self, zone: &str, unix_secs: i64) -> i64
The skew this interpretation produces, in ms, for a zone and a moment.
Utc is zero by construction — not “small”, zero: the front’s measured
+468 ms is ordinary clock error and is modelled separately by whoever
wants it, because a mock that baked half a second of noise into the
correct case would make an exact assertion impossible.