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:
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.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.
update:used code tags so brackets in syntax aren't hidden.
|
---|
In Section
Seekers of Perl Wisdom