Retrieving Date and Time From The Internet

Andre Garzia andre at
Wed Aug 17 08:55:37 EDT 2011


this thread made me curious...

I present to you a simple SNTP stack

go stack ""

It is a quick and dirty implementation with no error checking. It has one
function getTime(), you pass the NTP server and it returns the current date
and time in seconds format. I tried with our official Brazilian time servers
and it worked.

Hope this helps. By the way, I don't truly understand the NTP protocol, I
picked a couple ruby and python code and converted to livecode with the aid
of wireshark marvelous sniffer tool to see the damn datagrams flowing. (I
hate binary protocols)



More information about the Use-livecode mailing list