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

I started looking into this, but I hit the limit of my currently available resources. I hope to look further into this tonight. Here's what I found out so far:

I hope to test the example code in MSDN's tzset documentation using VS6, what ActivePerl uses.

Replies are listed 'Best First'.
Re^2: ENV{TZ} and localtime? (inconsistent time in child script)
by blahblahblah (Priest) on Sep 07, 2007 at 00:30 UTC
    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.