Atomic Clock Webservice?

There doesn't seem to be an "official" time webservice out there. There's a demo one hosted by Altova (makers of XML Spy) here that looks pretty good: There are several other demo ones out there if you Google timeservice.asmx.
I couldn't build an enterprise production application that relies on a demo that Altova could take down at any time, though.

I know there are several official NTP servers out there, (if you're not in the camp that believes Microsoft's time server is the first step in their attempt to control the very fabric of spacetime). I could implement or use an existing NTP client (this one looks good), but it's not a simple HTTP webrequest - it takes a TCP request and parsing the NTP time format. Since Microsoft.NET is all about XML web services, I shouldn't have to, should I?


  • There's a reason why time synchronization uses NTP and not HTTP. How are you going to compensate for the network times and server response times with HTTP? Or are you just going to adjust your clock to what you get from the web service, even though it's off by several (and possibly tens of) seconds?

  • Jerry -

    Right, I agree that NTP is good for what it does. But I'm sure that there are plenty of applications where it's okay to trade some accuracy (NTP has travel over the internet, too) for the simplicity of calling a webservice. My current application, for instance. Heck - there are webservices that do all kinds of wacky things, but none (that I'd bet a nickle will be around in 2 years) that will tell me the time?

    - Jon

  • Jon, NTP is designed to work with unreliable message delivery and compensates for transmition times. So yes, there are worse things than time synchronization over HTTP but that doesn't mean that everybody has to write useless (and actually harmful) code. Writing this as a web service is writing a web service for the sake of writing one.

  • Oh, okay. Thanks - I didn't know that about NTP. I'm not going to write a time service, I'll just do the getdate() on Sql Server trick. Still, I think a time web service would be handy in the "Hey, Lady, got the time?" kind of way - when I'd rather know the time with about a minute, but I'm thinking as a consumer of that kind of service rather than a provider.

  • OK. Scenario: I want to synchronise the clock on my PC through my corporate firewall, which blocks all traffic other than HTTP/S and FTP through the corporate proxy server.

    Why? Because the corporate timeserver is lousy and it lies like a cheap watch.

    So, a nice little system-tray app that takes proxy parameters and a corresponding NTP-esque web service would be hunky-dory.

    Any takers?


  • Well I want to incorporate it in my program as one way to see if a trial period has expired. For a goal like that a webserice would very much suffice.

Comments have been disabled for this content.