in reply to Determining Daylight Savings Time
5. Reset $ENV{TZ} to its original value so it doesn't muck up any other date calculations elsewhere in the code
You could of course localize %ENV:
yields:{ local $\ = "\n"; print scalar localtime; { local %ENV; $ENV{TZ} = 'GMT'; print scalar localtime; } print scalar localtime; }
Wed May 29 23:29:08 2002 Wed May 29 21:29:08 2002 Wed May 29 23:29:08 2002
Update/PS: -- for frontpaging your own node. Don't do that.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
|
---|
Replies are listed 'Best First'. | |
---|---|
(MeowChow) Re2: Determining Daylight Savings Time
by MeowChow (Vicar) on May 30, 2002 at 19:49 UTC | |
by Juerd (Abbot) on May 30, 2002 at 21:22 UTC | |
by MeowChow (Vicar) on May 30, 2002 at 21:39 UTC |