Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: ENV{TZ} and localtime? (inconsistent time in child script)

by blahblahblah (Priest)
on Sep 07, 2007 at 00:30 UTC ( #637560=note: print w/replies, xml ) Need Help??

in reply to Re: ENV{TZ} and localtime? (inconsistent time in child script)
in thread ENV{TZ} and localtime? (inconsistent time in child script)

Thanks, I think I found an solution in the docs you referenced for _tzset:
Use the following syntax to set the TZ environment variable: set TZ=tzn[+ | ]hh[:mm[:ss] ][dzn] tzn Three-letter time-zone name, such as PST. You must specify the correct + offset from local time to UTC.
So I tried "EST5EDT" instead of -0400, and that gives the right result. I'm still not sure why it behaves differently when called via system() though.

update:used code tags so brackets in syntax aren't hidden.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://637560]
[erix]: sorry, my attention is a rar commodity. I will not squander it on such pro-russia sites :)
[erix]: *rare commodity
[shmem]: erix: you are utterly mistaken in marking that site as "pro-russian".
[erix]: how do you mean? the bear, explanations of Putin's "election", the fearsome new russian weaponry. I came across them immediately. Just coincidence?
[shmem]: No, not coincidence - prejudice and bias
[shmem]: your scanner is pre-loaded ;-)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-03-19 21:06 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.