E
Ernst Murnleitner
Hello Readers,
I am looking for a replacement of <ctime>.
for the functions
gmtime
mktime
One reason is, that these time functions use statically allocated memory but
I want to use it in an multithreaded program.
Another reason is, that mktime is not the reverse of gmtime (but of
localtime).
The only thing I need is: convert a time_t value into struct tm and back -
but without daylight saving and time zones. The time should be in UTC.
Unfortunately mktime uses the timezone (OK, I could set the timezone
temporarily to GMT, but this is not clean).
I think there is already an open source code somewhere? (The formula for
converting struct tm into time_t would also be helpful).
Greetings and best thanks in advance
Ernst Murnleitner
I am looking for a replacement of <ctime>.
for the functions
gmtime
mktime
One reason is, that these time functions use statically allocated memory but
I want to use it in an multithreaded program.
Another reason is, that mktime is not the reverse of gmtime (but of
localtime).
The only thing I need is: convert a time_t value into struct tm and back -
but without daylight saving and time zones. The time should be in UTC.
Unfortunately mktime uses the timezone (OK, I could set the timezone
temporarily to GMT, but this is not clean).
I think there is already an open source code somewhere? (The formula for
converting struct tm into time_t would also be helpful).
Greetings and best thanks in advance
Ernst Murnleitner