I am writing an application to convert utc-time to different time intervals, now I can use something like this
putenv("TZ=TIMEZONE1"); tzset() ... do time conversions
but I don’t think it is thread-safe, is there also any C / C ++ library that can do the timezone conversion by taking timezone as an argument to the function instead of being global
Boost.DateTime supports time zone conversions.
, /, . - , , .
fork , , waitpid . , , , fork . , 1 fork 2-3 pthread_create , 1 pthread_create 2-3 open . - , , , 3-5 . , , , .
fork
waitpid
pthread_create
open