-1

We use a PHP script for syncing time against a NTP time server. All of it works, but when working with windows server, the script fails.

Is there a modified version of NTP working inside the original windows server distribution?

3
  • What errors exist after it fails to sync? Not sure how your PHP is syncing time, but you could run w32tm /resync Nov 26, 2014 at 22:27
  • w32tm is from Microsoft too. We tested it and it gives no errors!
    – WeSee
    Nov 26, 2014 at 22:30
  • The built-in W32Time service can act as both an NTP client and server. Of course if your Windows computer in a Domain, then you should be using domain-based type sync for your systems.
    – Zoredache
    Nov 26, 2014 at 22:35

2 Answers 2

3

Older versions of Windows Server uses SNTP, which while similar, is not the exact same thing as NTP. You will need a 3rd party package such as the one mentioned by mdpc to provide highly accurate NTP service. Another package available is Tardis 2000, which would provide an accurate NTP service as well. Please see this document for an explaination, and make sure that W32Time is disabled if you install a separate NTP service.

Zoredache is correct in mentioning that NTP support is built into the W32Time service; but the calculations used, and how the results are used afterwards, may be different from what your needs are. Keep in mind that the W32Time service, while flexible in its support of NTP, was meant to help with Active Directory due to its Kerberos underpinnings. I have observed several of our machines - servers and workstations - experience a slight time drift when relying on W32Time to keep things synchronized with the domain controller. The multi-second (or sometimes, minute) drift is usually OK and doesn't cause an issue for my work. If you need sub-second precision, you may want to read up a bit more about how W32Time works, and consider any potential issues.

1
  • 1
    BTW, the NTP package I mention in my response has been used since NT4 and above. And the site has win installable packages for NT, 2000, XP and newer.
    – mdpc
    Nov 26, 2014 at 22:48
2

I have successfully used a pre-compiled and packaged NTP client for Windows for several years. It IS the standard reference NTP package that is used by nearly all Linux systems for time synchronization including the configuration file. It properly installs itself as a service AND disables the default windows time sync. It is located at

 http://www.meinbergglobal.com/english/sw/ntp.htm#ntp_stable
5
  • I am not looking for new NTP services but focusing on the builtin Microsoft Windows NTP service. Does the builtin service not comply to the NTP protocol?
    – WeSee
    Nov 26, 2014 at 22:33
  • 1
    I don't think that it preserves ticks like the standard NTP package, the default time sync service that comes with windows does a nasty slew which could cause some problems in timed applications.
    – mdpc
    Nov 26, 2014 at 22:35
  • This is what I am wondering about. What service is running in windows server to sync time?
    – WeSee
    Nov 26, 2014 at 22:37
  • Take a look at the SERVICES snap-in...it is called "Windows Time". You can easily find specifics in the M$ website.
    – mdpc
    Nov 26, 2014 at 22:40
  • if you'll ever use Meinberg NTP, dont forget to avoid being NTP amplificator: add following lines to your ntp.conf: restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery Nov 27, 2014 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .