[PLUG] Question on GMT unix seconds to calendar and inverse time conversions
website reader
website.reader3 at gmail.com
Tue Mar 12 07:57:22 UTC 2013
The time_t unix_seconds = mktime(struct tm calendar) and the struct tm
calendar = *localtime(time_t unix_seconds) are nice inverses of each
other, but what do you do for
UTC time?
I don't want to set the local timezone of my PC to UTC for mktime() to
get it right and have unix_seconds agree with the local
clock_gettime() system time tv_sec value. mktime doesn't work right,
when you feed it a struct tm calendar built from gmtime() call. Or
did someone write a nice utcmktime() function?
More information about the PLUG
mailing list