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