in reply to Re^3: Standard way to convert timezone in multithreaded script
in thread Standard way to convert timezone in multithreaded script
Looking more closely at your code above, there is something strange going on that I do not understand.
In this part of the main thread, you change the value of $ENV{TZ} twice:
$ENV{TZ}="Europe/Paris"; my $t=localtime(); print "main (Europe/Paris): ",$t,"\n"; $ENV{TZ}="Europe/Moscow"; $t=localtime(); print "main (Europe/Moscow): ",$t,"\n";
But nowhere in that part of the code do you call tzset(), nor any of the functions in your XS code. And yet, according to the console output you've posted:
main (Europe/Paris): Tue Nov 24 23:27:28 2009 main (Europe/Moscow): Wed Nov 25 01:27:28 2009
The output from localtime is somehow affected. Which is exactly what didn't happen originally that caused you to post your OP?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Standard way to convert timezone in multithreaded script
by whale2 (Novice) on Nov 25, 2009 at 09:42 UTC | |
by whale2 (Novice) on Nov 25, 2009 at 11:00 UTC | |
by BrowserUk (Patriarch) on Nov 25, 2009 at 11:29 UTC | |
by whale2 (Novice) on Nov 25, 2009 at 15:03 UTC | |
|
Re^5: Standard way to convert timezone in multithreaded script
by ikegami (Patriarch) on Nov 25, 2009 at 18:48 UTC |