Friday November 05, 2004
Solaris on laptops and summer/winter time
Well this one really caught me by surprise. I use Solaris on my laptop
and since the the timezone changed I've noticed that the clock was out
by an hour when I rebooted from Solaris to another operating system.
It turns out that Solaris uses a configuration file - /etc/rtc_config
to determine the number of seconds offset that your bios clock is
offset relative to GMT. Solaris uses GMT on the inside, all dates and
times presented to the user are manipulated via the TZ variable (so you
can screw around with date displays using TZ=<foo> date).
There is a cron job for root, which runs at 2:01 every morning which
executed /usr/sbin/rtc -c, which reconfigures the zone_lag entry in the
/etc/rtc_config file. For some strange and unusual reason (call it
sanity) my laptop is not powered on at this late time of night (think
beer) so I was regularly an hour out of sync with the real world. xntp
would kick in and the clock would be resynced with the real world until
I rebooted into another OS where it would be incorrect. The fix is of
course to execute the /usr/sbin/rtc -c program from the command line
and when ntp next kicks off all is right with the world. It's a gotcha.
November 05, 2004 11:16 AM GMT
Permalink