Project

General

Profile

Actions

Bug #8980

closed

BIOS clock is sometimes one hour fast

Added by Gary Mills almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
2018-01-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

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:

zone_info=America/Winnipeg
zone_lag=21600

It has the correct time on the BIOS clock and on illumos. Another system, installed in May, has this infomation:

zone_info=America/Winnipeg
zone_lag=18000

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?

Actions #1

Updated by Gary Mills almost 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.

Actions #2

Updated by Electric Monk over 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 026e699f086745296cda4664068f50ace71e32e2

commit  026e699f086745296cda4664068f50ace71e32e2
Author: Gary Mills <gary_mills@fastmail.fm>
Date:   2018-03-14T20:00:47.000Z

    8980 BIOS clock is sometimes one hour fast
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Actions

Also available in: Atom PDF