BIOS clock is sometimes one hour fast
When this problem happens, the BIOS clock will be one hour ahead of local standard time. The illumos time will be correct. It seems to happen when the system is installed while DST is in effect. Most noticeable will be the wrong lag in /etc/rtc_config . For example, I have one system installed in January, with this information in the file:
It has the correct time on the BIOS clock and on illumos. Another system, installed in May, has this infomation:
This one exhibits the clock error. I'm assuming that the BIOS clock should run in local standard time all year round, and not change when DST is in effect. Certainly, it should not run in DST all year round.
According to the rst man page, the installer should run:
/usr/sbin/rtc -w -z time-zone
to create /etc/rtc_config on the newly-installed system. Indeed, the time stamp on that file shows that it's never been changed since installation. The cause of this discrepancy seems to be that the rtc utility computes the lag incorrectly when DST is in effect.
Has anybody else noticed this problem? Has anyone fixed it?
Updated by Gary Mills over 4 years ago
I've been investigating. Here's what happened:
The installer executed `/usr/sbin/rtc -z' to create the /etc/rtc_config file. It contained a `zone_lag' field that was the offset from UTC for the Real Time Clock (RTC). Because the file was created in the summer, when daylight saving time was in effect, the zone_lag value was one hour ahead of standard time. The current rtc utility is only able to set the RTC to track local time, including the DST offset. It relies on a cron command `/usr/sbin/rtc -c' to replace the zone_lag value in that file whenever DST comes into effect or whenever it comes to an end, that is twice a year. However, neither OI nor OI hipster include this command in the root crontab. Therefore, the zone_lag value never changes. It's one hour fast in the winter, and is correct in the summer.
My solution is to alter the rtc utility so that it can set the RTC to the other popular time standard: UTC, when requested by the installer. The kernel is already able to accomodate this change, keeping the system time still correct.
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 026e699f086745296cda4664068f50ace71e32e2 Author: Gary Mills <email@example.com> Date: 2018-03-14T20:00:47.000Z 8980 BIOS clock is sometimes one hour fast Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: C Fraire <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>