Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://637560]
help
Chatterbox?
[james28909]: yeah like wizard of oz lol. its just a joke though
[james28909]: i cannot understand how someone cant see that a cloud of gas that evolves into a solar system or galaxies. it just makes sense to me. everythign that has happened, had to have happened for anything on this planet to be.
[james28909]: /gas/gas and debris/
[james28909]: another thing, i used to be atheist. life experiences, personal evidence. and my own perception is the reason why i believe the things i do.
[erix]: and now you are agnostic?
[james28909]: arunbear, your picking bits of history to fit your own narrative. right now, humans are smarter than in any of those times.
[james28909]: in order for there to be a mutation, there has to be a universe with laws setup that even allow a mutation.

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (16)
As of 2017-12-15 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?