Uggggh. According to the POD from Date::Manip, PDT and PST are both valid values for TZ! Plus, there's no mention of 'PST8PDT', something I never would've guessed to try. :(

The following timezone names are currently understood (and can be used in parsing dates). These are zones defined in RFC 822. Universal: GMT, UT US zones : EST, EDT, CST, CDT, MST, MDT, PST, PDT Military : A to Z (except J) Other : +HHMM or -HHMM ISO 8601 : +HH:MM, +HH, -HH:MM, -HH

How did you know that it needs to be PST8PDT for the Pacific time zone? Could you point me to some manpages, books, or hyperlinks?

The only box-specific timezone information I can find on my machine is ZONE="America/Los_Angeles" in /etc/sysconfig/clock, but I don't know if this is Redhat-specific. Could you point me to another file where the default timezone is garnered if TZ isn't set?

I did find a page which gives some specific examples on what to set TZ to. Anyone who finds more info, please share!

Update:
Found this mention of PST8PDT in the docs:

The timezone may be in the STD#DST format (in which case both abbreviations must be in the table above) or any of the formats described above.
However, this also implies that 'PDT' is a valid value for the TZ environment variable, but it doesn't seem to work correctly (see original question).

---
"A Jedi uses the Force for knowledge and defense, never for attack."

In reply to Re: Re: setting TZ causes Date::Manip to report incorrect time by meonkeys
in thread setting TZ causes Date::Manip to report incorrect time by meonkeys

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.