Multiple OS clocks out of sync

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

I've run into an annoying problem by having two operating systems running on two disks. (Vista and Ubuntu)

When I boot Ubuntu the time is correct. If I restart the computer and boot Vista, Vista shows the time 4 hours ahead. If I change the clock in Vista it throws the clock off when I boot Ubuntu, if I then change it in Ubuntu it throws Vista off again.

If I go into the bios and set the clock to the correct time, it throws one of them off but I forgot which and I start all over again.

My timezone is GMT -5 (EST) and I think daylight savings time makes it -4 so I have a feeling it has something to do with a timezone somewhere, I just don't know what. I have the timezones set correctly in both operating systems.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

Suppose you set both of them to ping a time server at boot time?
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

Windows by default is set to get its time from time.windows.com. You can change that value to another time server and see if that may help. It requires a simple registry change.

The key that needs to be changed is

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

The value for NtpServer will be set to time.windows.com,0x1. Try changing it to ntp-s1.cise.ufl.edu,0x1, that time server is located in Florida.
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

What good would changing the time server for windows do? Both of them need to be set.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

the time.windows.com is sketchy at best, I've had PC's go off their timing and changing the time server fixed it. I'm sure somewhere in the Ubuntu config he can set the time server to the same one.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

When I click my clock in the taskbar (Vista) it opens a dialog with an "Internet Time" tab where I can click a "Change Settings" button that both lets me change time servers, and click a button to update immediately. That "ntp-s1.cise.ufl.edu" just gave me the correct time so I will keep using it.

The default sync interval seems to be a week in Vista. I haven't found a way to change this in that time dialog from my first paragraph, but I did find a mention of SpecialPollInterval which is the number of seconds between syncs in

Code: [ Select ]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpClient


First thought, drastically reduce that interval.
Second thought, probably get me banned from time servers.
Third thought, figure out how to trigger that "Update Now" button from the dialog programatically using an automated task or my startup folder. Pretty much what you said Don, but I still need to find out exactly how to do that. :)
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Found w32tm.

Here's what happens when I simply use a Command Prompt from the start menu

Code: [ Select ]
C:\Users\joebert>w32tm /resync
Sending resync command to local computer
The following error occurred: Access is denied. (0x80070005)
  1. C:\Users\joebert>w32tm /resync
  2. Sending resync command to local computer
  3. The following error occurred: Access is denied. (0x80070005)


Here's what happens if I right-click and "Run as Administrator" the Command Prompt from the start menu.

Code: [ Select ]
C:\Windows\system32>w32tm /resync
Sending resync command to local computer
The command completed successfully.
  1. C:\Windows\system32>w32tm /resync
  2. Sending resync command to local computer
  3. The command completed successfully.


I'm not sure how to setup an automated task using the task scheduler. I set one up so it runs that command at startup, I think I've set it to run using the "Administrators" group. I'm about to reboot and see what happens if I completely fudge the bios clock before Vista boots.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Ok I've got Vista squared away.

I used the Task Scheduler and its' "Create a basic task" wizard to setup a task that runs when the computer starts.

It starts a program, that program is w32tm and the arguments are the /resync switch.

The task runs as my user account with the "Highest Privileges" box checked since I'm the only user of this computer.

In the Conditions tab, the "Start only of the following network connection is available" box is checked and "any network" is selected.

In the Settings tab the "if the task fails, restart every" is set to 1 minute and the limit is 3 times.

About a minute after the system starts, it corrects the time. I'd like it to be quicker, but this will work.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Posts: 6809
  • Loc: Martinsburg, WV

Post 3+ Months Ago

Glad you got it sorted out.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Me to. Thanks for that time server, saved me needing to look around looking for a good one. :D
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

joebert, how about writing a login script or maybe a script file that you could link to from autoexec.bat? I think your delay is coming from waiting on the scheduler to start up, determine it needs to run something and finally run the task. A direct line could cut some of that wait.

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 74 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.