Recommended way to get a timestamp

What is the recommended way to get a timestamp in the firmware? I would like to post data to the server with a timestamp at the time of acquisition by the impee.


Squirrel provides a date() function which should help, this returns a server-synchronized UTC time.



d = date();
datestring = format("%02d:%02d:%02d", d.hour, d.min, d.sec);