On 03/12/13 00:57, website reader wrote:
> 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?

Perhaps this will help.

http://www.vttoth.com/CMS/technical-notes/94-using-mktime-to-convert-utc-dates


galen
-- 
Galen Seitz
[email protected]

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to