How to set system time in Unix C or C++
Posted on 2002-04-23
I am connected to a server (actually the NYSE) that transmits a multicast time stamp every 10 seconds or so. I can receive and decode the time stamp easily, as its in text format yymmddhhmmss. How do I programaticly (in c or c++) get the system time in the same format and set the system time if its more than a second off.
I am running c and/or c++ on a sun solaris box.