I have this at the top of a script right under 'use Date::Manip' because
of a similar issue:
if ($^O =~ m/(Win|32)/) {
Date_Init("TZ=AKST"); # this one for Windows--for some reason
the # trick doesn't work
}
else {
# automatically figures out if it's daylight time or not. Not
that it should matter in this program...
Date_Init("TZ=AKST#AKDT");
}
On some systems Date::Manip learns the timezones when it gets installed,
but sometimes you have to tell it, I don't understand why though.
-n
--
nathan vonnahme, system engineer at fairbanks memorial hospital/denali
center
1650 cowles street, fairbanks alaska 99701. 907-458-5464
> -----Original Message-----
> From: Laurie Vien [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 30, 2004 12:41 PM
> To: '[EMAIL PROTECTED]'
> Subject: What's wrong with UnixDate("30000101","%Y%m%d")?
>
>
> I know this isn't a DBI-specific question, but some of you
> are familiar with
> what I've been doing so I thought I'd post here:
>
> > The following line of Perl code:
> >
> > $earliest_contact = UnixDate("30000101","%Y%m%d");
> >
> >
> > results in the following error messages:
> > D:\>process_chunkmail_SEND.pl
> > ERROR: Date::Manip unable to determine TimeZone.
> > Date::Manip::Date_TimeZone called at
> /site/lib/Date/Manip.pm line
> > 661
> > Date::Manip::Date_Init() called at
> /site/lib/Date/Manip.pm line
> > 779
> > Date::Manip::ParseDateString(30000101) called at
> > /site/lib/Date/Manip.pm line 1725
> > Date::Manip::UnixDate(30000101, '%Y%m%d') called at
> > process_chunkmail_SEND.pl line 50
> >
> > Can anyone shed any light on what the problem is? Is it because
> > 01/01/3000 is too far in the future? I'm using v5.4.2 of DateManip.
> > NOTE: This problem does NOT happen on my machine; it
> happens on a remote
> > system to which I have no access. Another subsidiary is
> testing my Perl
> > script and reporting errors to me.
> >
> > Thank you.
> >
> > Laurie A. Vien
> > Sr. Programmer/Analyst
> > Ben & Jerry's Homemade, Inc.
> >
>