Formatting Unix timestamp with ctime in c
You're saying you have something like 1346426869 as a string and want it to be a time_t?
time_t raw_time = atoi("1346426869");printf("current time is %s",ctime(&raw_time));> current time is Fri Aug 31 11:27:49 2012
The time_t type is just an integer. It is the number of seconds since the Epoch. You'll need to parse the string first.
Start here:
and work your way forward from there.