Gossamer Forum
Home : Products : Links 2.0 : Installation -- Windows :

Adding new links

Quote Reply
Adding new links
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 ! Smile

Regards,

Dario
Subject Author Views Date
Thread Adding new links dariosoltani 2616 Mar 9, 2000, 5:22 AM
Post Re: Adding new links
Stealth 2552 Mar 8, 2000, 9:10 PM
Post Re: Adding new links
dan420 2551 Apr 9, 2000, 12:39 AM
Post Re: Adding new links
Stealth 2548 Apr 10, 2000, 5:08 PM