Atomic Clock Webservice? - Jon Galloway

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: http://www.nanonull.com/TimeService/TimeService.asmx. 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 time.nist.gov, time.microsoft.com (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?

Published Thursday, April 8, 2004 12:44 PM by Jon Galloway
Filed under:

Comments

# re: Atomic Clock Webservice?

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?

Thursday, April 8, 2004 4:09 PM by Jerry Pisk

# re: Atomic Clock Webservice?

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

Thursday, April 8, 2004 7:22 PM by Jon Galloway

# re: Atomic Clock Webservice?

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.

Thursday, April 8, 2004 10:53 PM by Jerry Pisk

# re: Atomic Clock Webservice?

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.

Friday, April 9, 2004 4:29 AM by Jon Galloway

# re: Atomic Clock Webservice?

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?

joel

Friday, June 18, 2004 10:59 AM by Joel Jeffery

# re: Atomic Clock Webservice?

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.

Sunday, February 18, 2007 7:11 AM by TG01