Timestamp

In a webapp I need correct time. Does anybody know the easiest way to grab time from the best timeserver ?

hopefully the time on the webserver is accurate. Then grab it from the webserver. If the time on the server is off, then that is what I would fix.

Since the webserver isn’t mine, I cannot trust the timesetting of this server. That’s why I wanted to grab it from a timeserver.

See https://forum.xojo.com/4122-how-to-get-the-real-current-date?search="ntp+example"

For what it’s worth, most web servers are set with NTP and they’re usually accurate to within a minute or two.

Just out of curiosity… how are you intending on measuring the accuracy of the time? My experience is that all of the NTP servers around the world are off by a little bit from one another. For example, Apple’s time servers (time.apple.com) don’t return the same exact values as time-a.nist.gov.

[quote=118510:@Greg O’Lone]For what it’s worth, most web servers are set with NTP and they’re usually accurate to within a minute or two.

Just out of curiosity… how are you intending on measuring the accuracy of the time? My experience is that all of the NTP servers around the world are off by a little bit from one another. For example, Apple’s time servers (time.apple.com) don’t return the same exact values as time-a.nist.gov.[/quote]

Given the transmission delay inherent to Internet between the time server and the client, it figures.