Jump to content

Correcting OS Clock Time Differences between OS X, Vista and Ubuntu

- - - - - Tribooting

  • Please log in to reply
No replies to this topic

#1
verdant

verdant

    InsanelyMac V.I.P.

  • Gurus
  • 5,548 posts
  • Gender:Male
  • Interests:At home, I have the following computers......
    >
    >
    >
The OS clock time differences between OS X, Vista and Ubuntu is a universal problem with dual-booting OS X and Vista [or any Windows OS except perhaps NT], or dual-booting Ubuntu and Vista [or any Windows OS except perhaps NT], or tri-booting OS X, Vista and Ubuntu.

The problem arises because of Coordinated Universal Time (UTC) versus Local Time :

UTC is a "constant" time, i.e. it is not subject to Daylight Saving Time or other time changes, and so local time is calculated from this. This makes it the logical choice for syncronising computers. As long as the reference time is kept in UTC, computers all over the world can be synchronised (especially important for servers etc.) and yet still maintain their local time information.

[UTC is International Atomic Time (TAI) with leap seconds added at irregular intervals to compensate for the Earth's slowing rotation. Leap seconds are used to allow UTC to closely track UT1, which is mean solar time at the Royal Observatory, Greenwich. UT1 is solar time on meridian 0. UT1 was previously called Greenwich Mean Time (GMT) because meridian 0 passes through the old Royal Observatory in Greenwich, London, England. The difference between UTC and UT1 cannot exceed 0.9 s, so if high precision is not required the general term Universal Time (UT) (without a suffix) may be used. In casual use, Greenwich Mean Time (GMT) is the same as UTC and UT1. Owing to the ambiguity of whether UTC or UT1 is meant, and because timekeeping laws usually refer to UTC, GMT is avoided in precise text – see http://en.wikipedia...._Universal_Time]

Hence, Unix-based OS's such as OS X and Ubuntu Linux (and Linux in general) keep time in UTC. So, on shut down, by default, OS X and Ubuntu Linux reset the computer BIOS (in CMOS memory or NVRAM) clock to UTC i.e. basically GMT . However, Windows OS's (except NT I believe) generally by default assume that your computer BIOS clock time is set to your Local Time.

That is, Vista on booting assumes that your computer BIOS clock time (now set to UTC from when OS X was shut down) is the local time (when it is actually UTC) and so shows the wrong time (unless you happen to live in London, England or some other place within the same time-zone; but even then when Daylight Saving is active etc).

The solution options I have tried for various OS booting scenarios are as follows:

NO WARRANTY IS IMPLIED OR GIVEN AS TO WHETHER OR NOT THESE STEPS WILL WORK FOR YOU AS THEY HAVE FOR ME.

A. SOLUTION for dual-booting OS X and Vista setup

Set Vista to use UTC (BIOS time set as UTC), and set OS X to update time via time server:


See ElBiggus posted solution in http://discussions.a...m...82
And josmul123 solution posted in
http://forums.macrum...ad.php?t=207491
which are essentially the same; I have adapted the procedure for Vista


1. Set BIOS time to UTC and boot Vista.

2. Click "Start" globe and type regedit in the "Start Search Box", then press Enter or highlight regedit and click.

3. Press Continue button in "User Account Control" window to open the Registry Editor.

4. In the Registry Editor window, navigate within the explorer to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

5. Navigate within the explorer to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

6. Click on the "TimeZoneInformation" folder from the LHS navigation pane if you haven't already done so.

7. If on doing so, there is an entry in the RHS window entitled "RealTimeIsUniversal" (without quotes), then double-click on it and a pop-up window "Edit DWORD (32-bit value) Value" will appear with the Hexadecimal button selected by default and the Value name "RealTimeIsUniversal" – leave these entries unchanged BUT if in the "Value data:" entry box there is a "0" highlighted – change this to a "1", and then click the OK button, and jump to step 9.

8. If on doing so, there is not an entry in the RHS window entitled "RealTimeIsUniversal" (without quotes), you need to create it :

Right click on the white space within the RHS window belonging to the "TimeZoneInformation" folder (which should still be open).

When "New" window pop-up appears go to the arrow and when the Options pop-up appears, select DWORD (32-bit value) Value.

A new key entry will appear in the "TimeZoneInformation" folder window.

In the name box for this new key entry type "RealTimeIsUniversal" (without quotes).

Now right-click on this new key icon and select Modify…. in the pop-up window.

A pop-up window "Edit DWORD (32-bit value) Value" will appear with the Hexadecimal button selected by default and the Value name "RealTimeIsUniversal" – leave these entries unchanged.

In the "Value data:" entry box there is a "0" highlighted – change this to a "1", and then click the OK button.

BE CAREFUL NOT TO ACCIDENTLY MODIFY OTHER REGISTRY KEYS - Windows Vista may stop booting and working properly.....

9. Close the Registry Editor window, and (i) set the Vista desktop gadget Clock time to show Computer Time and (ii) configure the Internet Time Settings in Date/Time via the Taskbar to synchronize with an Internet time server e.g. "time.nist.gov".

10. In OS X, go to System Preferences / Date & Time, and select "set date & time automatically:" and choose your Internet Time Server, e.g. "Apple Europe (time.euro.apple.com)".

B. SOLUTION for tri-booting OS X, Ubuntu and Vista setup

Set Vista to use UTC (BIOS time set as UTC) as in "Solution A. Steps 1 to 9" above, then confirm that Ubuntu is set to read and save BIOS time as UTC, and set Ubuntu and OS X to update time via time server:

1. Confirm BIOS time is set to UTC and boot Ubuntu.

2. In Ubuntu, go to Ubuntu icon/Accessories/Terminal.

3. In Terminal, at the $ prompt, type

sudo cp /etc/default/rcS /etc/default/rcS_backup

then press Enter, and enter password when requested.

This command saves a backup copy of the current rcS file.

4. Then at the $ prompt, type

sudo nano /etc/default/rcS

then press Enter, and enter password when requested.

This opens the "Nano" text editor window with the current rcS file loaded:

#
					 # /etc/default/rcS
					 #
					 # Default settings for the scripts in /etc/rcS.d/
					 #
					 # For information about these variables see the rcS(5) manual page.
					 #
					 # This file belongs to the "initscripts" package.
					 
					 TMPTIME=0
					 SULOGIN=no
					 DELAYLOGIN=no
					 UTC=yes
					 VERBOSE=no
					 FSCKFIX=no

If UTC=no in file above, change to UTC=yes, then save the modified by pressing ^O and then Enter. Finally, exit Nano text editor by pressing ^X, and type exit at the $ prompt.

If UTC=yes, then just save by pressing ^O and then Enter. Finally, exit Nano text editor by pressing ^X, and type exit at the $ prompt.

5. In Ubuntu go to System/Administration/Time and Date, and in the pop-up Time and Date Settings window, click on Unlock, enter password to then Authenticate; thus, for Configuration:, choose "Keep synchronised with internet servers", and for Time servers:, click on "Select Servers" and select your time zone server. Finally, close the Time and Date Settings window.

6. In OS X, go to System Preferences / Date & Time, and select "set date & time automatically:" and choose your Internet Time Server, e.g. "Apple Europe (time.euro.apple.com)".


C. SOLUTION for dual-booting Ubuntu and Vista setup

Leave Vista to use Local Time (BIOS time set as Local Time) as in "Solution A. Steps 1 to 9" above, then confirm that Ubuntu is set to read and save BIOS time as Local Time, and set Ubuntu to update time via time server:

1. Set BIOS time to Local Time and boot Ubuntu.

2. In Ubuntu, go to Ubuntu icon/Accessories/Terminal.

3. In Terminal, at the $ prompt, type

sudo cp /etc/default/rcS /etc/default/rcS_backup

then press Enter, and enter password when requested.

This command saves a backup copy of the current rcS file.

4. Then at the $ prompt, type

sudo nano /etc/default/rcS

then press Enter, and enter password when requested.

This opens the "Nano" text editor window with the current rcS file loaded:

#
					 # /etc/default/rcS
					 #
					 # Default settings for the scripts in /etc/rcS.d/
					 #
					 # For information about these variables see the rcS(5) manual page.
					 #
					 # This file belongs to the "initscripts" package.
					 
					 TMPTIME=0
					 SULOGIN=no
					 DELAYLOGIN=no
					 UTC=yes
					 VERBOSE=no
					 FSCKFIX=no

If UTC=yes in file above, change to UTC=no, then save the modified by pressing ^O and then Enter. Finally, exit Nano text editor by pressing ^X, and type exit at the $ prompt.

If UTC=no, then just save by pressing ^O and then Enter. Finally, exit Nano text editor by pressing ^X, and type exit at the $ prompt.

5. In Ubuntu go to System/Administration/Time and Date, and in the pop-up Time and Date Settings window, click on Unlock, enter password to then Authenticate; thus, for Configuration:, choose "Keep synchronised with internet servers", and for Time servers:, click on "Select Servers" and select your time zone server. Finally, close the Time and Date Settings window.


D. SOLUTION for dual-booting OS X and Windows (XP or Vista etc.) setup, should you have any problems with Windows using the Registry modification (as given in "Solution A. Steps 1 to 9" above) consistently.

For an in-depth explanation/discussion of potential RealTimeIsUniversal=1 problems, see http://www.cl.cam.ac...ish/ut-rtc.html


1. In System Preferences / Date & Time select "set date & time automatically:" and choose your Internet Time Server, e.g. "Apple Europe (time.euro.apple.com)".

2. Force OS X to resync its desktop clock time at login by using Lingon 2.1 (download from http://lingon.sourceforge.net/) to create a Users Daemon as follows:
i. Run Lingon 2.1 app.
ii. Click on "New" button.
iii. Select "Users Daemons" and click on "Create". Then:

In Box 1 under "Name" enter ChronoSync
In Box 2 under "What" enter ntpd –q
In Box 3 under "When" select run when it is loaded by the system (at startup or login)

iv. Click on "Save" button and logoff and login again as instructed.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy