I currently have a double containing a POSIX time stamp, and I am successfully using gmtime and asctime to display a calendar date via a time_t struct:
time_t input = posix;
printf("%s",asctime(gmtime(&input)));
This works well, except (obviously) when the POSIX time falls outside the time.h library's limits (i.e. 1901-2038), in which case it returns a date in 1901. Are there any easy alternatives to gmtime/asctime/time.h, or am I simply going to have to work with the raw figures?
Edit: I should add that having a result that falls outside those limits is fairly likely, as the posix double is the result of a calculation, rather than an instantiation of the current system time.