How, in unix, can I convert a time expressed in seconds from epoch to a normal date/time?
Unix Question?
Use localtime() function.
http://www.opengroup.org/onlinepubs/0000...
For example:
....
char timestring[60];
time_t t = time(NULL);
strftime(timestring, sizeof(timestring), "%Y-%m-%d %H:%M:%S", localtime(%26amp;t));
fresh flower
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment