[dba-Tech] worldtime.io and the other ways to programmatically get the current UTC time

Gustav Brock gustav at cactus.dk
Mon Nov 30 07:07:50 CST 2015


Hi Shamil

Thanks. I'll mark that code.

It sounds like a web page issue. It is probably intended for lookup, not continuous viewing.

/gustav

-----Oprindelig meddelelse-----
Fra: dba-Tech [mailto:dba-tech-bounces at databaseadvisors.com] På vegne af Salakhetdinov Shamil
Sendt: 30. november 2015 12:25
Til: Discussion of Hardware and Software issues <dba-tech at databaseadvisors.com>
Emne: Re: [dba-Tech] worldtime.io and the other ways to programmatically get the current UTC time

 Hi Gustav --

Thank you for your note and links.
I'm using code marked with a green checkmark, which gets current time value from  time.windows.com ( http://stackoverflow.com/questions/1193955/how-to-query-an-ntp-server-using-c ) . It seems to be working well.

worldtime.io is about 5 second behind now comparing to http://www.timeanddate.com/worldclock/germany/berlin
It could be their web page js issue - when I have opened it it was 1 second ahead.

-- Shamil

>Monday, November 30, 2015 10:43 AM UTC from Gustav Brock <gustav at cactus.dk>:
>
>Hi Shamil
>
>Here, worldtime.io seems to be one second off.
>
>For the last many years I've used pool.ntp.org - or rather the sub host as listed here:
>
>http://support.ntp.org/bin/view/Servers/NTPPoolServers
>
>If you on this page click europe.pool.nt.org
>
>http://www.pool.ntp.org/zone/europe
>
>you'll see dk.pool.ntp.org as well as ru.pool.ntp.org. These servers are probably those nearest to you.
>Other sources exist like Physikalisch-Technische Bundesanstalt (ptb) in Braunschweig:
>
>https://www.ptb.de/cms/ptb/fachabteilungen/abtq/fb-q4/ag-q42/zeitsynchronisation-von-rechnern-mit-hilfe-des-network-time-protocol-ntp.html
>
>My primary domain server adjust to the external ntp pool, and all other machines sync to these servers, not time.microsoft.com.
>
>Calling an NTP source is the closest you can get "easy" accurate time. The more precise alternative is a hardware clock that via longwave radio syncs to the European authorative time source in Frankfurt, but these are quite expensive.
>
>Which code from SO do you use? Several suggestions are listed.
>
>/gustav



More information about the dba-Tech mailing list