initially, i also had time zone problems using Date::Manip

however, for myself, the following, at the head of a script using Date::Manip, solves the problem:
Date_Init("TZ=GMT", "WorkDayBeg=$wdb", "WorkDayEnd=$wde");
with s/GMT/yourtimezone, ($wdb, $wde) = ("08:00", "17:00").

as for the list of timezones, i found them in the Date::Manip perldoc too, but yes, no mention of "PST8PDT". Thelonius gets his info from the source itself, where you will find PST8PDT, MST7MDT, CST6CDT etc. i believe these are shorthands for 'US/Pacific', 'US/Mountain', which are in the documentation for Date::Manip.

given that Date::Manip is as useful as it is, esp. for business day calcs, it is a pity the docs are not a little more expansive on the subject.

Does this mean that Date::Manip has problems with timezones, as BigLug suggests? i think the docs, rather than the code, are the problem. it would be interesting to see a proper comparison of DateTime functionality with Date::Manip; i would be surprised if Date::Manip came off worst:

Date::Manip can alter the number of seconds in the day via "WorkDayBeg" and "WorkDayEnd" in Date_init() (see above), so it, at least, does not suffer from making the assumption that there are 24*60*60 seconds in a day.

In addition formats parsed and output by Date::Manip are really extensive. It has been the only date module i have ever needed, and "use Date::Manip" is not exessively cluttery.

however, i have to say, i found it took me a while to get to grips with the intricacies of this important but labour-intensive module. i see no tutorials in PM involving Date::Manip; has the time come for one?

here is hoping...

wufnik

...in the world of the mules there are no rules

In reply to Re: setting TZ causes Date::Manip to report incorrect time by wufnik
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.