Ticket #11980 (new defect)
guest additions should write system time to RTC after adjusting it
|Reported by:||yrro||Owned by:|
When booting a Linux distribution using systemd, the system time is not automatically written to the RTC during shutdown. For further information & rationale, see < http://lists.freedesktop.org/archives/systemd-devel/2011-May/002526.html>.
As a result, booting my system under VirtualBox results in the following:
Jul 22 03:46:06 wintermute kernel: rtc_cmos rtc_cmos: setting system clock to 2013-07-22 02:46:03 UTC (1374461163) ... Jul 22 03:46:07 wintermute systemd-fsck: /dev/sdb1: Superblock last write time is in the future. Jul 22 03:46:07 wintermute systemd-fsck: (by less than a day, probably due to the hardware clock being incorrectly set). FIXED. Jul 22 03:46:07 wintermute systemd-fsck: /dev/sdb1: clean, 340335/39321600 files, 138917904/157286139 blocks ... Jul 22 03:46:08 wintermute systemd: Started LSB: VirtualBox Linux Additions. Jul 22 13:57:43 wintermute systemd: Time has been changed
After boot, we can observe the RTC is still wrong:
$ date Mon 22 Jul 14:10:15 BST 2013 # hwclock -r Mon 22 Jul 2013 03:58:44 BST -0.070616 seconds
After the guest editions have set the system clock from the host clock, they should set the hardware clock to match. That is, perform the equivalent of hwclock --systohc.