Casper Dik's Weblog

Casper Dik's Weblog


20050412 Tuesday April 12, 2005

Timezones and multi boot. One of the things that has always been bothering me is the fact that on x86 systems you cannot really run multiple operating systems and survice the timezone change. That's because the clock runs in local time; and localtime is ambiguous. The system cannot tell whether the DST change has been or not so it needs to record this fact in the filesystem (that's why Solaris on x86 has the "rtc -c" cronjob). If you boot all your OSes in turn after the changeover, your system will be N hours off once they're all done adjusting time. The problem is probably best summarized here

On Unix this was long solved by running the clock in the UTC or GMT timezone; that clock is unambiguous, give or take a leap second, and allows multiple versions of the OS to coexist.

Last week, it was pointed out to me in comp.unix.solaris that there is a hidden registry key in later releases of MS-Windows. I already knew how to fix up Solaris, so I combined this to:



       Set the following registry key (it does not exist!)

HKLM/SYSTEM/CurrentControlSet/Control/TimeZoneInformation/RealTimeIsUniversal
(REG_DWORD = 1)

       In the control panel with Day&Time settings, check the "automatically adjust" check box.


        Boot into Solaris and run:


              rtc -c -z UTC

        then correct the clock with date/rdate
        (if you use liveupgrade, lumount your other partition(s) and copy the
        /etc/rtc_config file to all of them)

        In Linux, you'll need to run "timeconfig" and select "RTC set to GMT".


Note that if you don't multiboot, it's probably also a good idea to run "rtc -c -z UTC" and then correct the date; for one you won't be bitten by the AMD64 timezone bug we had in Solaris 10. (2005-04-12 06:13:30.0) Permalink Comments [4]

Calendar

« April 2005 »
MonTueWedThuFriSatSun
    
1
2
3
4
5
6
7
8
10
11
13
15
16
17
18
21
22
23
24
25
28
29
30
 
       
Today

RSS Feeds

XML
All
/General
/OpenSolaris
/Solaris

Search

Links


Navigation



Referers

Today's Page Hits: 24