Hello,
When I try to add new links I get the following message (after I've pushed the submit button):
CGI ERROR
==========================================
Error Message : fatal error: Can't locate Time/Local.pm in @INC (@INC contains: d:\html\users\2fast2com\html\cgi-bin\links\admin .) at d:\html\users\2fast2com\html\cgi-bin\links\admin/links.cfg line 160.
line 160 contains this:
149: sub date_to_unix {
150: # --------------------------------------------------------
151: # This routine must take your date format and return the time a la UNIX time().
152: # Some things to be careful about..
153: # timelocal does not like to be in array context, don't do my($time) = 154: timelocal (..)
155: # int your values just in case to remove spaces, etc.
156: # catch the fatal error timelocal will generate if you have a bad date..
157: # don't forget that the month is indexed from 0!
159: #
160: my $date = shift; my $i;
161: my %months = map { $_ => $i++ } qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov 162: Dec!;
163: my ($day, $mon, $year) = split(/-/, $date);
164:
165: exists $months{$mon} or return undef;
166: $day = int($day); $year = $year - 1900;
167:
168: require Time::Local;
169: my $time = 0;
170: eval {
171: $time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
172: };
173: if ($@) { die "invalid date format: $date - parsed as (day: $day, month:
174: $months{$mon}, year: $year). Reason: $@"; }
175: return $time;
176: }
I hope this will look alright in the forum.
I think my problem has to do with the $date variable. Im running on a NT server. Please help me asap !
Regards,
Dario
When I try to add new links I get the following message (after I've pushed the submit button):
CGI ERROR
==========================================
Error Message : fatal error: Can't locate Time/Local.pm in @INC (@INC contains: d:\html\users\2fast2com\html\cgi-bin\links\admin .) at d:\html\users\2fast2com\html\cgi-bin\links\admin/links.cfg line 160.
line 160 contains this:
149: sub date_to_unix {
150: # --------------------------------------------------------
151: # This routine must take your date format and return the time a la UNIX time().
152: # Some things to be careful about..
153: # timelocal does not like to be in array context, don't do my($time) = 154: timelocal (..)
155: # int your values just in case to remove spaces, etc.
156: # catch the fatal error timelocal will generate if you have a bad date..
157: # don't forget that the month is indexed from 0!
159: #
160: my $date = shift; my $i;
161: my %months = map { $_ => $i++ } qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov 162: Dec!;
163: my ($day, $mon, $year) = split(/-/, $date);
164:
165: exists $months{$mon} or return undef;
166: $day = int($day); $year = $year - 1900;
167:
168: require Time::Local;
169: my $time = 0;
170: eval {
171: $time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
172: };
173: if ($@) { die "invalid date format: $date - parsed as (day: $day, month:
174: $months{$mon}, year: $year). Reason: $@"; }
175: return $time;
176: }
I hope this will look alright in the forum.
I think my problem has to do with the $date variable. Im running on a NT server. Please help me asap !

Regards,
Dario