in reply to Re^2: Time zones
in thread Time zones
In any case, changing %ENV only affects perl and it's children, so your other applications and users won't be affected. (Note: perl is in the same process as Apache in mod_perl, so it would probably affect it a bit more in that scenario.)
But you use local to tightly scope the change if you were so inclined:
print scalar(localtime),"\n"; { local $ENV{'TZ'} = 'AST4ADT'; print scalar(localtime),"\n"; } print scalar(localtime),"\n"; __END__ output ====== Mon Sep 27 15:43:45 2004 Mon Sep 27 16:43:45 2004 Mon Sep 27 15:43:45 2004
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Time zones
by Duco (Sexton) on Sep 27, 2004 at 23:48 UTC | |
|
Re^4: Time zones
by Anonymous Monk on Sep 27, 2004 at 19:44 UTC | |
by sgifford (Prior) on Sep 27, 2004 at 20:18 UTC | |
by Anonymous Monk on Sep 27, 2004 at 20:25 UTC | |
by Anonymous Monk on Sep 27, 2004 at 20:34 UTC | |
by sgifford (Prior) on Sep 27, 2004 at 21:16 UTC | |
by ikegami (Patriarch) on Sep 27, 2004 at 20:00 UTC | |
by Anonymous Monk on Sep 27, 2004 at 20:16 UTC | |
by ikegami (Patriarch) on Sep 27, 2004 at 20:30 UTC | |
by Anonymous Monk on Sep 27, 2004 at 21:08 UTC | |
by ikegami (Patriarch) on Sep 27, 2004 at 21:10 UTC | |
|