none
W32Time algorithm to correct time skews

    Question

  • Hi,

    I was hoping someone could clarify the algorithms used in Windows 2003 (and 2008 / 2012 if known) to correct time skews. The best I can find relates to Windows 2000:

    When the local clock offset has been determined, the following algorithm is used to adjust the time: 

    • If the local clock time of the client is behind the current time received from the server, W32Time will change the local clock time immediately.
    • If the local clock time of the client is more than three minutes ahead of the time on the server, W32Time will change the local clock time immediately.
    • If the local clock time of the client is less than three minutes ahead of the time on the server, W32Time will quarter or halve the clock frequency for long enough to bring the clocks into sync. If the client is less that 15 seconds ahead, it will halve the frequency; otherwise, it will quarter the frequency. The amount of time the clock spends running at an unusual frequency depends on the size of the offset that is being corrected. 

    http://download.microsoft.com/download/2/0/f/20f61625-7b2a-4531-b007-1c714f1e51b7/wintimeserv.doc

    Thanks

    David

    Wednesday, September 04, 2013 6:30 AM

Answers

  • Refer to http://technet.microsoft.com/en-us/library/cc773263%28v=ws.10%29.aspx

    In particular:

    In order for W32Time to set the computer clock gradually, the offset
    must be less than the MaxAllowedPhaseOffset value and satisfy the
    following equation at the same time:

    |CurrentTimeOffset| / (PhaseCorrectRate*UpdateInterval) < SystemClockRate / 2

    hth
    Marcin

    • Marked as answer by David4576 Thursday, September 05, 2013 5:27 AM
    • Unmarked as answer by David4576 Thursday, September 05, 2013 11:14 AM
    • Marked as answer by David4576 Thursday, September 05, 2013 12:53 PM
    Thursday, September 05, 2013 12:50 AM
  • Then you're out of luck

    Install a Windows Server 2008 R2 member server or a Windows 7 client...

    hth
    Marcin

    • Marked as answer by David4576 Thursday, September 05, 2013 12:53 PM
    Thursday, September 05, 2013 12:43 PM

All replies

  • Hi, please see that; How the Windows Time Service Works

    thanks


    MCP | MCTS - Exchange 2007, Configuring | Member of TechNet Wiki Community Council | French Moderator on TechNet Wiki (Translation Widget)

    Wednesday, September 04, 2013 3:36 AM
  • Hi, please see that; How the Windows Time Service Works

    thanks


    MCP | MCTS - Exchange 2007, Configuring | Member of TechNet Wiki Community Council | French Moderator on TechNet Wiki (Translation Widget)

    Please quote me the answer from this link...
    Wednesday, September 04, 2013 5:38 AM
  • Hi David,

    Quote from the above article.

    When the W32Time Manager receives time samples, it uses special algorithms in NTP to determine which of the time samples is the most appropriate for use. The time service also uses another set of algorithms to determine which of the configured time sources is the most accurate. When the time service has determined which time sample is best, based on the above criteria, it adjusts the local clock rate to allow it to converge toward the correct time. If the time difference between the local clock and the selected accurate time sample (also called the time skew) is too large to correct by adjusting the local clock rate, the time service sets the local clock to the correct time. This adjustment of clock rate or direct clock time change is known as clock discipline.

    Hope this helps.


    Best Regards
    Jeremy Wu

    Wednesday, September 04, 2013 6:06 AM
  • If the time difference between the local clock and the selected accurate time sample (also called the time skew) is too large to correct by adjusting the local clock rate, the time service sets the local clock to the correct time.

    What is too large?

    As with the Windows 2000 quote I'm looking for specifics...

    Wednesday, September 04, 2013 6:27 AM
  • Any thoughts?
    Wednesday, September 04, 2013 9:54 PM
  • Refer to http://technet.microsoft.com/en-us/library/cc773263%28v=ws.10%29.aspx

    In particular:

    In order for W32Time to set the computer clock gradually, the offset
    must be less than the MaxAllowedPhaseOffset value and satisfy the
    following equation at the same time:

    |CurrentTimeOffset| / (PhaseCorrectRate*UpdateInterval) < SystemClockRate / 2

    hth
    Marcin

    • Marked as answer by David4576 Thursday, September 05, 2013 5:27 AM
    • Unmarked as answer by David4576 Thursday, September 05, 2013 11:14 AM
    • Marked as answer by David4576 Thursday, September 05, 2013 12:53 PM
    Thursday, September 05, 2013 12:50 AM
  • |CurrentTimeOffset| / (PhaseCorrectRate*UpdateInterval) < SystemClockRate / 2


    The suggested way to determine the SystemClockRate is: 

    W32tm /query /status /verbose

    However /query isn't available in Windows 2003 - any ideas?

    Thursday, September 05, 2013 11:14 AM
  • Run the command from Windows Server 2008/2008R2 or later

    hth
    Marcin

    Thursday, September 05, 2013 11:24 AM
  • Run the command from Windows Server 2008/2008R2 or later

    hth
    Marcin

    If it's purely a 2003 domain though...
    Thursday, September 05, 2013 12:19 PM
  • Then you're out of luck

    Install a Windows Server 2008 R2 member server or a Windows 7 client...

    hth
    Marcin

    • Marked as answer by David4576 Thursday, September 05, 2013 12:53 PM
    Thursday, September 05, 2013 12:43 PM
  • Okay no worries. Thanks for your help :)
    Thursday, September 05, 2013 12:53 PM