I tried using Time::Local in 2 different manners, (with & without range
checking - based on range chekings performed by timelocal(), &
timegm_nocheck() ), and I ended up getting the following error meesages
which appear to be inconsitent.
In one case (CASE 1), the complaing was about the subroutine being
non-existent, and in the other (CASE 2), the complaint was about days
being out of range (which I had tried to address in CASE 1 with
no_range_check option!)
#!/usr/bin/perl -W
#
#FileName: dbClient1.pl
#
use strict;
use diagnostics;
use DBI;
use Date::Calc qw(Add_Delta_Days);
#use Date::Manip;
##NO_use Time::Local 'timelocal_nocheck';
use Time::Local;
...............
..........
.........
Here are the 2 cases and their associated error messages I got:
CASE 1
----------
use Time::Local 'timelocal_nocheck';
Undefined subroutine &main::timelocal called at C:\......myCode.pl line
98 (#1)
The subroutine indicated hasn't beem define, or if it was, it
has since been undefined.
Uncaught exception from user code
CASE 2
----------
Use Time::Local;
Use of uninitialized value in integer multiplication (*) at
C:/Perl/lib/Time/Local.pm line 76 (#1)
...................................................................
..................................................................
Day '31' out of range 1..30 at c:\................myCode.pl 98
At C:/Perl/lib/Time/Local.pm line 116
Time::Local::timegm called at C:/Perl/lib/Time/Local/pm line 153
Time::Local::timelocal(0, 0, 0, 31, 08, 2004) called at
C:\....myCode.pl line 98
Main::string_to_date('2004-08-31') called at C:\.......myCode.pl
line 72
Thanks,
Behzad