… | |
… | |
247 | These functions are best understood by an example: The following |
247 | These functions are best understood by an example: The following |
248 | function will change the current timezone to |
248 | function will change the current timezone to |
249 | "Antarctica/South_Pole", which requires a call to "tzset", but by |
249 | "Antarctica/South_Pole", which requires a call to "tzset", but by |
250 | using "on_enter" and "on_leave", which remember/change the current |
250 | using "on_enter" and "on_leave", which remember/change the current |
251 | timezone and restore the previous value, respectively, the timezone |
251 | timezone and restore the previous value, respectively, the timezone |
252 | is only changes for the coro that installed those handlers. |
252 | is only changed for the coro that installed those handlers. |
253 | |
253 | |
254 | use POSIX qw(tzset); |
254 | use POSIX qw(tzset); |
255 | |
255 | |
256 | async { |
256 | async { |
257 | my $old_tz; # store outside TZ value here |
257 | my $old_tz; # store outside TZ value here |