<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Windows Time Service</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/w32time/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/w32time/feed.xml</link>
    <description>The official blog site for the Windows Time Service</description>
    <lastBuildDate>Sat, 06 Apr 2019 02:05:59 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Impending GPS Week Number rollover</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/impending-gps-week-number-rollover</link>
      <pubDate>Sat, 06 Apr 2019 02:02:57 GMT</pubDate>
      <dc:creator><![CDATA[Sarath Madakasira MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/?p=275</guid>
      <description><![CDATA[If you are synchronizing time from national NTP servers or servers that derive their time from...]]></description>
      <content:encoded><![CDATA[If you are synchronizing time from national NTP servers or servers that derive their time from national NTP servers, this is most likely a non-event for you. National NTP servers typically use local (terrestrial) accurate clocks to serve time and don't rely on GPS for time distribution. I should mention that I can't speak for any of these public deployments. I am optimistic that they all will fare just fine tomorrow.

If you are using GPS time source(s), this information is relevant to you.

<strong>Disclaimer:</strong> <em>Microsoft neither endorses, manufactures nor sells any GPS-enabled time sources or servers. This post is just an FYI, based on information published by GPS/USNO.</em>

GPS time sources are widely used in accurate, reliable NTP and PTP time servers and it is my understanding that they are often used to supply time to Microsoft Windows deployments as well. Other operating systems in your environment are likely be affected by time issues arising from this event. Hence this last minute blog post to give a heads up about an impending GPS event that can potentially affect the time in your systems.

The "Week Number" field in the GPS messaging is scheduled to rollover in about 22 hours time from when this post is made, just before April 7th, 2019 UTC rolls in.

You can read about this event on the dedicated <a href="https://www.usno.navy.mil/USNO/time/gps/gps-week-number-rollover">USNO website</a> or on <a href="https://www.gps.gov/">gps.gov homepage</a>. The latter website has a countdown clock to the event for easy visualization.

Whether or not the Microsoft Windows machines in your deployment are affected depends on many factors. The most important factor is the GPS time source you are using and whether it handles the week rollover correctly. Subsequent factors include your time distribution topology and W32time service configuration on the individual Windows machines.

Please refer to documentation from your GPS time source supplier about how the equipment will fare during this rollover.

The default W32time service settings should prevent it from accepting very large time corrections from upstream sources. How your Windows machine(s) is/are affected depends on your specific settings.

In any case, I would suggest to keep an eye out for unusual time issues when the rollover occurs tomorrow. (And be cautious using your GPS for navigation tomorrow, may be?)]]></content:encoded>
    </item>
    <item>
      <title>Windows Time Sync Accuracy Adendum is Available</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/windows-time-sync-accuracy-adendum-is-available</link>
      <pubDate>Fri, 16 Dec 2016 21:20:44 GMT</pubDate>
      <dc:creator><![CDATA[Paul E Long]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/?p=256</guid>
      <description><![CDATA[We have published a new document which contains more details about our testing and measurement...]]></description>
      <content:encoded><![CDATA[We have <a href="https://windocs.blob.core.windows.net/windocs/WindowsTimeSyncAccuracy_Addendum.pdf">published a new document </a>which contains more details about our testing and measurement methodologies for high accuracy time synchronization.  This technical document describes how samples are normalized and presents the data across all the machines we tested.  Using this information, you should be able to duplicate the tests in your own environment as well as corroborate our results.  So if you have some spare hours this weekend, and are really interested in the nitty gritty detail, give it a read.]]></content:encoded>
    </item>
    <item>
      <title>Windows Server 2016 Time Accuracy Improvements Video</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/windows-server-2016-time-accuracy-improvements-video</link>
      <pubDate>Tue, 04 Oct 2016 17:17:38 GMT</pubDate>
      <dc:creator><![CDATA[Paul E Long]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/?p=255</guid>
      <description><![CDATA[We’ve posted a short video on Channel9 which provides a high-level discussion of the improvements to...]]></description>
      <content:encoded><![CDATA[<span style="color: #000000;font-family: Calibri">We’ve </span><a href="https://aka.ms/WS2016TimeVideo"><span style="color: #0563c1;font-family: Calibri">posted a short video on Channel9</span></a><span style="color: #000000;font-family: Calibri"> which provides a high-level discussion of the improvements to time accuracy with Windows Server 2016, as well as some simple guidance on what is required in order to achieve the highest accuracy in your environment.  </span>

<span style="color: #000000;font-family: Calibri">Of course the </span><a href="https://aka.ms/WS2016Time"><span style="color: #0563c1;font-family: Calibri">TechNet article</span></a><span style="color: #000000;font-family: Calibri"> has much more detail, but this should help you come up to speed quickly.  Enjoy!</span>

<iframe width="840" height="473" frameborder="0" allowfullscreen="allowfullscreen" src="https://channel9.msdn.com/Blogs/windowsserver/Time-Improvements-in-Windows-Server-2016/player"></iframe>

<span style="color: #000000;font-family: Calibri">The short link is: </span><a href="https://aka.ms/WS2016TimeVideo"><span style="color: #0563c1;font-family: Calibri">https://aka.ms/WS2016TimeVideo</span></a>]]></content:encoded>
    </item>
    <item>
      <title>Windows Server 2016 Improvements in Time Accuracy</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/windows-server-2016-improvements-in-time-accuracy</link>
      <pubDate>Fri, 30 Sep 2016 15:33:24 GMT</pubDate>
      <dc:creator><![CDATA[Paul E Long]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/?p=245</guid>
      <description><![CDATA[In 2017, governments are requiring stricter time accuracy with regards to UTC for financial...]]></description>
      <content:encoded><![CDATA[<span style="color: #000000;font-family: Calibri">In 2017, governments are requiring stricter time accuracy with regards to UTC for financial transactions.</span><span><span style="color: #000000;font-family: Calibri">   </span></span><span style="color: #000000;font-family: Calibri">We have improved the time accuracy in Window Server 2016 and under the right conditions, UTC time accurate to within </span><span><span style="color: #000000;font-family: Calibri">±</span></span><span style="color: #000000;font-family: Calibri">1 millisecond, can be distributed throughout your domain.</span><span><span style="color: #000000;font-family: Calibri">  </span></span><span style="color: #000000;font-family: Calibri">Additionally, these improvements extend to Hyper-V where the same accuracy can be delivered to Windows Server 2016 and Windows 10 Anniversary guests.</span>

<span style="color: #000000;font-family: Calibri">For all the details about these changes, measurements and best practices, please visit our TechNet article at </span><a href="https://aka.ms/WS2016Time"><span style="color: #0563c1;font-family: Calibri">https://aka.ms/WS2016Time</span></a><span style="color: #000000;font-family: Calibri">.</span><span><span style="color: #000000;font-family: Calibri">  </span></span>

<span style="color: #000000;font-family: Calibri">Accurate time is becoming increasingly more important not only for financial scenarios, but healthcare, IT, manufacturing, retail, and many other transaction based activities.</span><span><span style="color: #000000;font-family: Calibri">  </span></span><span style="color: #000000;font-family: Calibri">Provided you have a suitable environment, Windows Server can now support these types of workloads by distributing time accurate to within </span><span><span style="color: #000000;font-family: Calibri">±</span></span><span style="color: #000000;font-family: Calibri">1 millisecond in your domain. </span>]]></content:encoded>
    </item>
    <item>
      <title>Secure Time Seeding – improving time keeping in Windows</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/secure-time-seeding-improving-time-keeping-in-windows</link>
      <pubDate>Wed, 28 Sep 2016 19:09:17 GMT</pubDate>
      <dc:creator><![CDATA[Sarath Madakasira MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/?p=225</guid>
      <description><![CDATA[What year is...]]></description>
      <content:encoded><![CDATA[<div class="ExternalClass186A2ECFE8D141469B87B6BB84C80AFC">
<h1>What year is it?</h1>
(<a href="https://i1.kym-cdn.com/entries/icons/original/000/007/784/what-year-is-it-robin-williams.jpg"><span>https://i1.kym-cdn.com/entries/icons/original/000/007/784/what-year-is-it-robin-williams.jpg</span></a> AKA Robin Williams' Jumanji meme)

Most network security protocols rely on the use of keys that expire after a certain amount of time. This appears to be a plain vanilla statement until you think a bit about it. Timekeeping over long periods of time is critical for tracking the lifetime and expiry of security keys. We innately understand the passage of time and take it for granted that our computers and devices will automatically do this for us with reasonable accuracy, at least to the extent required for key rollover.

Computers must keep track of time when they are running and even when they are turned off. The latter functionality is the only way to know what time it is when they are turned back on again. By extension this is also the only way they know which keys are valid and which are not.

PCs and big form-factor hardware have a dedicated battery to power their system clock. We barely notice anything is amiss when we power-cycle these machines. Miniaturization of consumer devices has led to the elimination of this on-board dedicated (CMOS) battery, whose function is now delegated to the main device battery. The device batteries do this job as expected most of the time.

One of the annoying things about device batteries is that they run out of power (often when we seem to need them the most). As the device battery depletes and then drains completely, the time keeping function it supports also stops. The devices powered up from this state typically start up with their clock set to a random time value. This presents a <em>little</em> problem to the device in keeping track of the validity of its keys, some of which are used in secure networking – i.e. the device cannot connect securely to the outside world without an intervention to correct its clock.

You may ask – why doesn’t the device ask the nearest time server for the current time over the network? Since the device is not in a state to communicate securely over the network, it cannot obtain time securely over the network as well, unless you choose to ignore network security or at least punch some holes into it by making exceptions.

To summarize the issue, grossly incorrect system time can cause network security to be impaired, which in turn prevents obtaining the current time securely over the network. This is a classic circular dependency.

You may have experienced this problem on your tablet or mobile device in the form of connectivity issues to secure services. Increasing use of sleeker/smaller devices means this issue is bound to occur widely, impacting the users of these devices. Devices with aging batteries will start to experience this problem more often, contributing to the frequency of occurrence of this issue. It could also occur on larger hardware like PCs when their on-board battery drains completely (a rare event, but a certain event nonetheless).

Asking the users to check their system time when they cannot get their emails or when they cannot sign on to their websites or when they cannot sign into their AD domains will get old really fast. We had to address and solve this problem at a system level.
<h1>Solutions to this problem</h1>
<h2>Hosting a custom "Secure" Time Service:</h2>
A possible solution would involve the client obtaining the current time from a server over a protocol like SSL, ignoring errors in time-related protocol validations on the client. Any exceptions to the security validations requires thorough scrutiny since we are opening the client to potential attacks, which in part makes this an unfavorable solution. Additionally, we have to maintain a server available at all times and the clients may or may not be able to reach said server from the network they are on – additional challenges that reduce the effectiveness of this solution.
<h2>Secure Time Seeding - a client-side solution:</h2>
We started looking for solutions that would not require us to make security exceptions and SSL protocol contained data that we could use. We decided to stick to the principle of trusting only the data from SSL connections that can be established based on the certificates installed on the client, without treating specific certificates differently – i.e. a mechanism that is not very different from the one we had before.

SSL protocol allows a client to securely participate in a handshake with a server and perform time-related validation towards the end of the handshake (e.g.: certificate validity using the local system clock). Essentially a client can trust the certificates installed locally to perform the SSL handshake, but it may not trust the server enough to establish the connection because its local system time indicates the server’s certificate chain is invalid.

The SSL handshake contains encrypted/signed time metadata from the server that can be used by the client to determine the current time. This secure metadata helped us to break the cyclical dependency between client system time and security keys including SSL certificates.

We use the following two pieces of metadata from the SSL handshake:
<ol>
 	<li>ServerUnixTime, an informational field.</li>
 	<li>OCSP validity period, which is part of the cryptographically signed data obtained from optional stapled <a href="https://en.wikipedia.org/wiki/Online_Certificate_Status_Protocol">OCSP</a> packet that has been tacked on to the SSL certificate chain presented by the server to the client.</li>
</ol>
The ServerUnixTime is supposed to be the current system time on the server, but it can also be set to a random value by some SSL implementations. We have observed that most servers provide a fairly accurate value in this field and the rest provide random values. We use this data field assuming it is somewhat accurate but can also be incorrect.

Stapled OCSP packets provide a very reliable time range, but it has low adoption on the internet and the time range can be as long as a week, making it not very suitable for use by the system clock. However, in cases where the system clock is off by weeks/months/years, setting the system clock to within a week’s accuracy is certainly a huge improvement. This OCSP time range data can be used by itself or combined with the ServerUnixTime to improve the accuracy of the time range.

We took the approach to not trust the data from a lone server, irrespective of who the server identifies itself as. We rely on corroborating information from multiple servers to arrive at a common truth about the current time.

The SSL connections made from the client are randomly interspersed in time and the metadata they provide follows suit as well. Our algorithms corroborate the data and determine reliable range for the current time. The information from ServerUnixTime and OCSP validity periods are merged to produce the smallest possible reliable time range value along with a confidence score. When the confidence score is sufficiently high, this data becomes information.  We are calling this as <em>Secure Time Seed of High Confidence (STSHC)</em>.

<em>STSHC</em> is actionable information and it is used to correct grossly incorrect system clocks (i.e. seed them with a good value). After this occurs, a more accurate time synchronization is expected to be carried out using NTP (secured or unsecured) to bring the system clock close to the current time. In fact, both clock correction functions are performed by the Windows Time Service (W32Time).

A grossly incorrect system clock may cause the initial few SSL connections to fail, but the calling client applications tend to retry the calls after a short time. <em>STSHC</em> may have been established and the system clock corrected when the retry occurs and the retried SSL calls would likely succeed. This provides a very seamless experience for the end users, instead of them having to diagnose errors originating from SSL certificate validation failures due to incorrect system time. This is a big win for the overall user experience with SSL.

<em>STSHC</em> is also used to monitor the system clock for gross errors and correct those at the next chance. This adds another obstacle to tampering the system clock or even flaky clock hardware to some extent.
<h1>Does this work?</h1>
The Secure Time Seeding feature was shipped in the Windows 10 November 2015 release and is turned on by default. You may have seen the improvements in timekeeping on your Windows tablets and other Windows devices running this version of the OS. We have seen it work time and again given the prerequisites are met.
<h2>I want to see this in action</h2>
This feature requires W32time Service to be enabled (“Set Time Automatically” Date-Time UI setting enabled), internet connectivity and outgoing SSL traffic from your machine or device to function. Assuming you have the above prerequisites met, you can watch this feature in action by moving your system clock forward or backward by a week or longer and watch it get corrected after a short duration.
<h2>I trust my hardware clock and time synchronization mechanisms. I don't want this!</h2>
If you would rather trust your system clock than time data generated from your SSL traffic and want to forgo any benefit this feature gives you, we got your back. Set the following registry value to<strong> 0</strong> and reboot your machine and the Secure Time Seeding feature will be disabled. (Standard warning about exercising care while modifying registry applies here).

<em>Registry Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config</em>

<em>Value Name: UtilizeSslTimeData</em>

<em>Value Type: REG_DWORD</em><i>
</i>
<h2>I changed my mind and want the feature back on.</h2>
Just set the above registry value to<strong> 1 </strong>and reboot your machine. Please remember that W32time service must also be enabled (“Set Time Automatically” setting in the Date-Time UI). (Standard warning about exercising care while modifying registry applies here as well).

</div>
<div class="ExternalClass186A2ECFE8D141469B87B6BB84C80AFC">
<h2>Feature Availability</h2>
This feature was first introduced in Windows 10 Client November release (November 2015 release). It is available in both Windows Server 2016 and Windows 10 Client Anniversary releases. The feature is turned on by default in all these versions of the OS.
<h2>Known Issues</h2>
We have a known issue related to this feature in the Windows 10 Client November Release. Refer to <a href="https://support.microsoft.com/en-us/kb/3160312">KB article 3160312 </a>for more details.  This issue has been fixed in the Windows 10 Anniversary Release.

</div>]]></content:encoded>
    </item>
    <item>
      <title>Moving Day</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/moving-day</link>
      <pubDate>Wed, 16 Nov 2011 15:43:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Sizemore MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/2011/11/16/moving-day/</guid>
      <description><![CDATA[How the time flies.
With over 2 years since the last post, it is high time we get this blog moving...]]></description>
      <content:encoded><![CDATA[<p>How the time flies.</p>
<p>With over 2 years since the last post, it is high time we get this blog moving again. Looking at the traffic statistics, there were nearly 50k views of the <a title="https://blogs.msdn.com/b/w32time/archive/2009/08/07/net-time-and-w32time.aspx" href="https://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/NET TIME and w32time post">NET TIME and w32time post</a>, so it is evident that folks are still interested in this content. However, since I am no longer a developer for the Windows Time Service, I wont be posting to this blog. Instead, I have a now blog that is just a click away: <a href="https://blogs.msdn.com/ryansize">https://blogs.msdn.com/ryansize</a></p>
<p>On the new blog, I will still talk about the Windows Time Service, as well as a few other interesting topics. The first few posts will be dedicated to the Active Directory Management Pack, but take heart; I have a few ideas already lined up for the Windows Time Service.</p>
<p>With that, I would recommend jumping to (and bookmarking) my <a title="https://blogs.msdn.com/ryansize" href="https://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/new blog">new blog</a>. Let the posting begin!</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>NET TIME and w32time</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/net-time-and-w32time</link>
      <pubDate>Fri, 07 Aug 2009 12:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Sizemore]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/2009/08/07/net-time-and-w32time/</guid>
      <description><![CDATA[It seems there is a bit of ambiguity out there regarding the relationship between w32time and the...]]></description>
      <content:encoded><![CDATA[<P>It seems there is a bit of ambiguity out there regarding the relationship between w32time and the NET TIME command. Well, here are the answers, straight from the horse's mouth.</P>
<P><STRONG>Taking it from the top</STRONG>&nbsp;</P>
<P>As all of you know (or at least <EM>should</EM>) know by now, w32time is the Windows Time Service, which&nbsp;is an independent service that runs on nearly all Windows computers from Windows 2000 onward. It is comprised of the time service (aka w32time) and the w32tm.exe user-mode application for management and troubleshooting. The service communicates on port 123 via UDP for time synchronization using the NTP protocol. Communication between w32tm.exe and the time service uses a custom RPC interface.</P>
<P>In contrast, NET TIME (or more appropriately, the net.exe application) is a user-mode tool for verifying the time on a remote computer using a totally separate mechanism. The net.exe application lives in the System32 directory and is a jack-of-all-trades tool for changing various configuration elements of the operating system.&nbsp;</P>
<P><STRONG>How the NET TIME command works</STRONG>&nbsp;</P>
<P>The net.exe application has been around for a long time, perhaps even pre-Windows 2000. All of the functionality in the net.exe application revolves around the Net* <A href="https://msdn.microsoft.com/en-us/library/aa370675(VS.85).aspx" mce_href="https://msdn.microsoft.com/en-us/library/aa370675(VS.85).aspx">functions exposed in the NetApi32.dll library</A>. This includes a number of&nbsp;really powerful functions such as NetUserAdd, NetUserChangePassword, NetJoinDomain, and other such functions. Among the list of&nbsp;functions is the <A href="https://msdn.microsoft.com/en-us/library/aa370612(VS.85).aspx" mce_href="https://msdn.microsoft.com/en-us/library/aa370612(VS.85).aspx">NetRemoteTOD function</A>, which is exposed via NET TIME.&nbsp;This function can be called locally on&nbsp;a computer to get the time on a remote system using RPC. Now, you may be saying "Ryan, why would I use the NET TIME command when I can call 'w32tm.exe /stripchart' and get essentially the same information, but more accurately?" I'm glad you asked!</P>
<P>Let's take a moment and read a sentence from that last paragraph again. The NetRemoteTOD function can be called locally on a computer to get the time on a remote system <U><STRONG><EM>using RPC</EM></STRONG></U>. The important part is that this communication occurs using RPC, not NTP, which is why the NET TIME command is still useful today. Let's say that for some reason the time service wasn't running on a particular computer, perhaps because it had (gasp!) crashed or (double-gasp) was mis-configured and was not running. Well, if you need to check the time on that system, you are out of luck with w32tm.exe. Because w32tm.exe uses NTP to check the time on a remote system, the time service needs to be running on that remote system in order for the time check to work. By comparison, since the NetRemoteTOD facility uses RPC, the remote system only needs to have the RPC service running on a remote system in order to check the time. This is the power of NET TIME.</P>
<P>The NET TIME command is however not perfect. In a typical environment, domain controllers (which are the typical target of a NetRemoteTOD call) might not be accessible from every machine on the domain. On the other hand, UDP 123 which is used by the time service is rarely blocked.</P>
<P mce_keep="true"><STRONG>How to use the NET TIME command</STRONG></P>
<P mce_keep="true">The net.exe application the following syntax:</P>
<BLOCKQUOTE>
<P>&nbsp;C:\&gt;net<BR>The syntax of this command is:</P>
<P>NET<BR>&nbsp;&nbsp;&nbsp; [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STATISTICS | STOP | TIME | USE | USER | VIEW ]<BR></P></BLOCKQUOTE>
<P>We are particularly interested in the 'TIME' argument, which has the following syntax (note that this is the output according to Windows7):</P>
<BLOCKQUOTE>
<P>C:\&gt;net help time<BR>The syntax of this command is:</P>
<P>NET TIME</P>
<P>[\\computername | /DOMAIN[:domainname] | /RTSDOMAIN[:domainname]] [/SET]</P>
<P>NET TIME synchronizes the computer's clock with that of another computer<BR>or domain, or displays the time for a computer or domain. When used without<BR>options on a Windows Server domain, it displays the current<BR>date and time at the computer designated as the time server for the domain.</P>
<P>\\computername&nbsp; Is the name of the computer you want to check or<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; synchronize with.</P>
<P>/DOMAIN[:domainname]&nbsp; Specifies to synchronize the time from the Primary Domain<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Controller of domainname.</P>
<P>/RTSDOMAIN[:domainname]&nbsp; Specifies to synchronize with a Reliable Time Server<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from domainname.</P>
<P>/SET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Synchronizes the computer's time with the time<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on the specified computer or domain.</P>
<P>The /QUERYSNTP and /SETSNTP options have been deprecated. Please use w32tm.exe<BR>to configure the Windows Time Service.</P>
<P>NET HELP command | MORE displays Help one screen at a time.</P></BLOCKQUOTE>
<P>As you can see, there are a number of options here, all of which deserve some explanation. By default, when you run the NET TIME command without any arguments, it will attempt to locate a domain controller (using DC Locator)&nbsp;and then use NetRemoteTOD to get the time on that DC. </P>
<P>The NET TIME command exposes three switches which can be used to control it's behavior. The /DOMAIN option can be used to specify the name of a domain in which to locate a domain controller to talk to by requesting a domain controller with the TIMESERV flag set in NetLogon.&nbsp;&nbsp;The /RTSDOMAIN option&nbsp;works the same way, except that it requests a domain controller with the GTIMESERV flag set instead. The /SET command can be used to update the clock on the <STRONG><EM><U>local</U></EM></STRONG> computer to match the time stamp returned by the remote computer.</P>
<P>Finally, you can call the NET TIME command with the name of a machine on your network to force NET TIME to get the time of that machine, rather than locating a domain controller.</P>
<P>You may also notice that the /QUERYSNTP and /SETSNTP flags are also included with the NET TIME command. Prior to the days of w32tm.exe, these commands were used to configured the server that w32time would synchronize with. Since w32tm.exe handles this work now, the /QUERYSNTP and /SETSNTP arguments have been deprecated.</P>
<P><STRONG>Putting it in practice</STRONG></P>
<P>By calling the NET TIME command without any arguments, we will get the time according to a domain controller in the domain. The domain controller that is chosen is completely arbitrary - there is no guarantee that you will get a specific DC, only that it will have the TIMESERV flag set, saying that it is a time server for the domain.</P>
<BLOCKQUOTE>
<P>C:\&gt;net time<BR>Current time at \\DC-01.mydomain.com is 8/7/2009 10:01:42 AM</P></BLOCKQUOTE>
<P>If we use the /DOMAIN flag, we can specify the domain that we want to query:</P>
<BLOCKQUOTE>
<P>C:\&gt;net time /DOMAIN:mydomain.com<BR>Current time at \\DC-01.mydomain.com is 8/7/2009 10:04:12 AM</P></BLOCKQUOTE>
<P>Additionally, we can query the domain controller directly:</P>
<BLOCKQUOTE>
<P>&nbsp;C:\&gt;net time \\DC-01.mydomain.com<BR>Current time at \\DC-01.mydomain.com is 8/7/2009 10:06:01 AM</P></BLOCKQUOTE>
<P>In fact, the machine that we query doesn't need to be a domain controller. I could just as easily query my local machine using the NetRemoteTOD facility:</P>
<BLOCKQUOTE>
<P>C:\&gt;net time \\localhost<BR>Current time at \\localhost is 8/7/2009 10:12:11 AM</P></BLOCKQUOTE>
<P><U>Note</U>: Keep in mind that unless you explicitly specify the name of the machine you want to query, the NET TIME command will locate a time source using DC Locator. If the time service has failed for one reason or another, the TIMESERV flag will likely NOT be set for that machine. However, you can still query the machine explicitly and you will still be able to check the time on that machine.</P>
<P><STRONG>Conclusion</STRONG></P>
<P>As always, I try to anticipate any questions you might have regarding the content here. However, if you do have any questions or feel that I have missed something, please post a comment below. If you have a general question about the time service,&nbsp;I encourage you to ask it in the <A href="https://social.technet.microsoft.com/forums/en-US/winserverDS/threads/" mce_href="https://social.technet.microsoft.com/forums/en-US/winserverDS/threads/">forums</A>.</P>]]></content:encoded>
    </item>
    <item>
      <title>Group Policy Settings Explained</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/group-policy-settings-explained</link>
      <pubDate>Mon, 02 Feb 2009 11:31:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Sizemore]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/2009/02/02/group-policy-settings-explained/</guid>
      <description><![CDATA[In an effort to alleviate confusion around the Windows Time Service group policy settings, here is a...]]></description>
      <content:encoded><![CDATA[<P>In an effort to alleviate confusion around the Windows Time Service group policy settings, here is a detailed explaination of the various settings, what their respective purposes are, and a small bit about how to configure them.</P>
<P>Keep in mind that Windows Time Service is designed to be very robust right out of the box. Only adjust these settings if you see a clear and present reason to do so.</P>
<P><STRONG>Note that these settings are targeted at Windows Server 2008.</STRONG></P>
<P><U>W32Time Global Configuration Settings<BR></U>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Specifies a set of parameters for all domain controllers that are installed in your environment. These parameters may differ from the parameters that are set on domain member computers. For domain member values, see Configure a client computer for automatic domain time synchronization (<A href="https://go.microsoft.com/fwlink/?LinkId=139706" mce_href="https://go.microsoft.com/fwlink/?LinkId=139706">https://go.microsoft.com/fwlink/?LinkId=139706</A>). These parameters control how the local clock is controlled (disciplined) and how availability is advertised. Many of the settings are scalar values. This means that they do not correspond to specific unit measurements; instead, the values have meaning only in relation to one another. </P>
<P><EM>Clock discipline parameters</EM></P>
<P><STRONG>FrequencyCorrectRate</STRONG>: This is a scalar value that controls the rate at which the Windows Time service (W32time) corrects the local clock's frequency (speed). Lower values reduce the local clock's frequency, which causes the local clock to correct more slowly. Larger values cause the local clock to correct more quickly. If this value is too small, the local clock is unstable and it overcorrects. If this value is too large, the clock takes a long time to synchronize. This value must be set to a whole number of 1 or greater. The default value is 4.</P>
<P><STRONG>HoldPeriod</STRONG>: This value indicates how many potentially accurate time samples the client must receive in a series before subsequent time samples are evaluated as potential spikes. After a period of not receiving any usable time samples, a time client ceases to evaluate time samples for spikes as soon as the first potentially accurate time sample is received. When a series of time samples (as indicated by the HoldPeriod) is received, the time client evaluates subsequent time samples for spikes. A time sample is considered to be a spike when the time difference between a time sample and the client's local clock is greater than that of the LargePhaseOffset value. The default HoldPeriod value is 5.</P>
<P><STRONG>LargePhaseOffset</STRONG>: This value, expressed in 100-nanosecond (ns) units, specifies the time variation from the client's local clock (phase offset) that a time sample must have to be considered a spike. Time samples that have time variations larger than the LargePhaseOffset value are considered spikes. The default value is fifty million (50,000,000, or 5 seconds). For reference, there are 10 million (10,000,000) 100-ns units in 1 second.</P>
<P><STRONG>MaxAllowedPhaseOffset</STRONG>: This value, expressed in seconds, controls how W32time corrects the clock based on the size of the calculated time variation between the time sample and the client's local clock. If a response is received that has a time variation that is larger than this value, W32time sets the client's local clock immediately to the time that is accepted as accurate from the Network Time Protocol (NTP) server. If the time variation is less than this value, the client's local clock is corrected gradually. The default value is 300 seconds (5 minutes).</P>
<P><STRONG>MaxNegPhaseCorrection</STRONG>: This value, expressed in seconds, controls the maximum allowable clock correction that can be made in a reverse direction. If a time sample is received that indicates a time in the past (as compared to the client's local clock) that has a time difference that is greater than the MaxNegPhaseCorrection value, the time sample is discarded. If this happens, the Windows Time source logs an event in the System log of Event Viewer. The default value is 172,800 seconds (48 hours).</P>
<P><STRONG>MaxPosPhaseCorrection</STRONG>: This value, expressed in seconds, controls the maximum allowable clock correction that can be made in a forward direction. If a time sample is received that indicates a time in the future (as compared to the client's local clock) that has a time difference greater than the MaxPosPhaseCorrection value, the time sample is discarded. If this happens, the Windows Time source logs an event in the System log of Event Viewer. The default value is 172,800 seconds (48 hours). </P>
<P><STRONG>PhaseCorrectRate</STRONG>: This is a scalar value that controls how quickly W32time corrects the client's local clock difference to match time samples that are accepted as accurate from the NTP server. Lower values cause the clock to correct more slowly, while larger values cause the clock to correct more quickly. This value must be a whole number greater than 0. The default value is 7.</P>
<P><STRONG>PollAdjustFactor</STRONG>: This is a scalar value that controls how quickly W32time changes polling intervals. When responses are considered to be accurate, the polling interval lengthens automatically. When responses are considered to be inaccurate, the polling interval shortens automatically. The default value is 5.</P>
<P><STRONG>SpikeWatchPeriod</STRONG>: This value, expressed in seconds, specifies the amount of time that suspicious time samples are received from a time source before these time samples are accepted as accurate. Time samples are considered suspicious when the time difference between the time sample and the client's local clock is larger than the value of LargePhaseOffset. SpikeWatchPeriod is used in conjunction with the HoldPeriod to help eliminate sporadic, inaccurate time samples that are returned from a peer. The default value is 900 seconds (15 minutes).</P>
<P><STRONG>UpdateInterval</STRONG>: This value, expressed in 1/100-second units, specifies the amount of time that W32time waits between corrections when the clock is being corrected gradually. When it makes a gradual correction, the service adjusts the clock slightly, waits this amount of time, and then checks to see if another adjustment is needed, until the correction is finished. The default value is 100 hundredths of a second units (1 second).</P>
<P><EM>General parameters</EM>:</P>
<P><STRONG>AnnounceFlags</STRONG>: This is a bitmask value that controls how time service availability is advertised through NetLogon. For all possible values, see Config\AnnounceFlags Entry (<A href="https://go.microsoft.com/fwlink/?LinkId=139718" mce_href="https://go.microsoft.com/fwlink/?LinkId=139718">https://go.microsoft.com/fwlink/?LinkId=139718</A>). The default value is 10 decimal (0x0a hexadecimal).</P>
<P><STRONG>EventLogFlags</STRONG>: This is a bitmask value that controls special events that may be logged to the Event Viewer System log. For all possible values, see NtpClient\EventLogFlags Subkey (<A href="https://go.microsoft.com/fwlink/?LinkId=139720" mce_href="https://go.microsoft.com/fwlink/?LinkId=139720">https://go.microsoft.com/fwlink/?LinkId=139720</A>). The default value is 2 decimal (0x02 hexadecimal).</P>
<P><STRONG>LocalClockDispersion</STRONG>: This setting, expressed in seconds, is applicable only when the NTP server is using the time of the local CMOS clock. The LocalClockDispersion value indicates the maximum error in seconds that is reported by the NTP server to clients that are requesting a time sample. The default value is 10 seconds.</P>
<P><STRONG>MaxPollInterval</STRONG>: This value, expressed in log base-2 seconds, controls the maximum polling interval, which defines the maximum amount of time between polls of a peer. The default value is 10, which is computed as 2 to the power of 10 and equals 1,024 seconds. The time service itself is considered unsynchronized after 1.5 times the number of seconds that are specified by this entry have elapsed. NTP specifies that the maximum clock age is 86,400 seconds. Therefore, if the value of this entry is greater than 15, peers will eventually ignore this server.</P>
<P><STRONG>MinPollInterval</STRONG>: This value, expressed in log base-2 seconds, controls the minimum polling interval that defines the minimum amount of time between polls of a peer. The default value is 6, which is computed as 2 to the power of 6 and equals 64 seconds.</P>
<P><BR><EM>Read-only domain controller parameters</EM>:</P>
<P>To learn more about how Windows Time service works on a read-only domain controller (RODC), see Appendix A: Technical Reference Topics (<A href="https://go.microsoft.com/fwlink/?LinkID=128273" mce_href="https://go.microsoft.com/fwlink/?LinkID=128273">https://go.microsoft.com/fwlink/?LinkID=128273</A>).</P>
<P><STRONG>ChainEntryTimeout</STRONG>: This value, expressed in seconds, specifies the maximum amount of time that an entry can remain in the chaining table before the entry is considered to be expired. Entries that are marked as expired may be removed when the next request or response is processed on the RODC. The default value is 16 seconds.</P>
<P><STRONG>ChainMaxEntries</STRONG>: This value, expressed as a number of entries, controls the maximum number of entries that are allowed in the chaining table. If the chaining table is full and no expired entries can be removed, any incoming requests are discarded. The default value is 128 entries.</P>
<P><STRONG>ChainMaxHostEntries</STRONG>: This value, expressed as a number of entries, controls the maximum number of entries that are allowed in the chaining table for a particular host. If a time synchronization request is received and the chaining table already contains the maximum number of entries for that IP address, the request is discarded. The default value is 4 entries. </P>
<P><STRONG>ChainDisable</STRONG>: This value, expressed as boolean value, controls whether or not the chaining mechanism is disabled. If chaining is disabled, the RODC can synchronize with any domain controller, but hosts that do not have their passwords cached on the RODC will not be able to synchronize with the RODC. The possible values are 1, which disables chaining, or 0, which enables chaining. The default value is 0.</P>
<P><STRONG>ChainLoggingRate</STRONG>: This value, expressed in minutes, controls the frequency that an event that indicates the number of successful and unsuccessful chaining attempts is logged to the System log in Event Viewer. The default value is 30, which causes an event to be generated every 30 minutes.</P>
<P><BR><U>W32Time NTP Client Configuration Settings</U><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>Specifies a set of parameters for controlling the Windows NTP Client.</P>
<P><STRONG>NtpServer</STRONG>: The Domain Name System (DNS) name or IP address of an NTP time source. This value is in the form of "dnsName,flags" where flags is a hexadecimal bitmask of the flags for that host. For more information, see the NTP Client Group Policy Settings Associated with Windows Time section of the Windows Time Service Group Policy Settings (<A href="https://go.microsoft.com/fwlink/?LinkId=139727" mce_href="https://go.microsoft.com/fwlink/?LinkId=139727">https://go.microsoft.com/fwlink/?LinkId=139727</A>). The default value is "time.windows.com,0x09".</P>
<P><STRONG>Type</STRONG>: This value controls the authentication that W32time uses. The default value is NT5DS.</P>
<P><STRONG>CrossSiteSyncFlags</STRONG>: This value, expressed as a bitmask, controls how W32time chooses time sources outside its own site. The possible values are 0, 1, and 2. Setting this value to 0 (None) indicates that the time client should not attempt to synchronize time outside its site. Setting this value to 1 (PdcOnly) indicates that only the computers that function as primary domain controller (PDC) emulator operations masters in other domains can be used as synchronization partners when the client has to synchronize time with a partner outside its own site. Setting a value of 2 (All) indicates that any synchronization partner can be used. This value is ignored if the NT5DS value is not set. The default value is 2 decimal (0x02 hexadecimal).</P>
<P><STRONG>ResolvePeerBackoffMinutes</STRONG>: This value, expressed in minutes, controls how long W32time waits before it attempts to resolve a DNS name when a previous attempt failed. The default value is 15 minutes.</P>
<P><STRONG>ResolvePeerBackoffMaxTimes</STRONG>: This value controls how many times W32time attempts to resolve a DNS name before the discovery process is restarted. Each time DNS name resolution fails, the amount of time to wait before the next attempt will be twice the previous amount. The default value is 7 attempts.</P>
<P><STRONG>SpecialPollInterval</STRONG>: This NTP client value, expressed in seconds, controls how often a manually configured time source is polled when the time source is configured to use a special polling interval. If the SpecialInterval flag is enabled on the NTPServer setting, the client uses the value that is set as the SpecialPollInterval, instead of the MinPollInterval and MaxPollInterval values, to determine how frequently to poll the time source. The default value is 3600 seconds (1 hour).</P>
<P><STRONG>EventLogFlags</STRONG>: This value is a bitmask that controls events that may be logged to the System log in Event Viewer. Setting this value to 0x1 indicates that W32time will create an event whenever a time jump is detected. Setting this value to 0x2 indicates that W32time will create an event whenever a time source change is made. Because it is a bitmask value, setting 0x3 (the addition of 0x1 and 0x2) indicates that both time jumps and time source changes will be logged.</P>]]></content:encoded>
    </item>
    <item>
      <title>Demystifying Group Policy Settings</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/demystifying-group-policy-settings</link>
      <pubDate>Fri, 30 Jan 2009 18:12:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Sizemore]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/2009/01/30/demystifying-group-policy-settings/</guid>
      <description><![CDATA[The settings for the Windows Time Service exposed through group policy have long been seen as a bit...]]></description>
      <content:encoded><![CDATA[<P>The settings for the Windows Time Service exposed through group policy have long been seen as a bit mysterious, and for good reason. Well,&nbsp;today we will take the first steps towards remedying that problem. After spending a good amount of time with one of my favorite writers (thanks Kurt!), we have developed a revised text for explaining these group policy settings.</P>
<P>Keep in mind that this is simple text. The prupose is not to explain every scenario where these values should be changed or which environments dictate that a change be made. Rather the point of this text is simply to provide a better understanding of what these values are, what effect they will have on the Time Service, and what values are applicable when adjusting these settings.</P>
<P><A href="https://blogs.msdn.com/w32time/pages/group-policy-settings-explained.aspx">https://blogs.msdn.com/w32time/pages/group-policy-settings-explained.aspx</A></P>
<P>Enjoy!</P>]]></content:encoded>
    </item>
    <item>
      <title>Configuring an Authoritative Time Server with Group Policy Using WMI Filtering</title>
      <link>https://docs.microsoft.com/archive/blogs/w32time/configuring-an-authoritative-time-server-with-group-policy-using-wmi-filtering</link>
      <pubDate>Fri, 05 Dec 2008 18:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Sizemore]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/w32time/2008/12/05/configuring-an-authoritative-time-server-with-group-policy-using-wmi-filtering/</guid>
      <description><![CDATA[Brian Singleton has posted on article on configuring w32time via Group Policy using WMI on the AskDS...]]></description>
      <content:encoded><![CDATA[Brian Singleton has posted on article on configuring w32time via Group Policy using WMI on the AskDS Blog. You can check it out here: <A href="https://blogs.technet.com/askds/archive/2008/11/13/configuring-an-authoritative-time-server-with-group-policy-using-wmi-filtering.aspx">https://blogs.technet.com/askds/archive/2008/11/13/configuring-an-authoritative-time-server-with-group-policy-using-wmi-filtering.aspx</A>]]></content:encoded>
    </item>
  </channel>
</rss>