in reply to Re^4: Time zones
in thread Time zones

I didn't explain it correctly. The problem isn't that I'd have to modify 50 scripts for the new zone. The problem is that modifing the TZ environment variable might affect those scripts. You said that TZ only effects the Perl scrips and their children. I'm not sure if localizing the TZ environment variable like you did would olny make the varibale accessable by the local script (the script with the code in it) or if the others would pick it up. I only want my script to see it.

Replies are listed 'Best First'.
Re^6: Time zones
by ikegami (Patriarch) on Sep 27, 2004 at 20:30 UTC
    and I didn't explain myself corrently. When I said it would only affect "perl and it's children", I was refering to any given perl process. In your terminology, it will only affect your script if you only put it in your script. And if you use local, it will only affect a small region of the script, as demonstrated by the example I posted. Enjoy!
      I cut and pasted your code but got the same times for al the prints. Am I missing something?
        Setting TZ doesn't seem to work in Windows. Are you using Windows?