Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Fatal Error - Invalid Date Format

Quote Reply
Fatal Error - Invalid Date Format
Im in the process of moving Links 2.0 from one ISP to another. Most of it seems to work, but when I do a build all.... I get this error.

Please advise what I should do.


Building URL Index . . .
Done.
Updating New and Popular Records . . .
CGI ERROR
==========================================
Error Message : fatal error: invalid date format: 6-Mar-2099 - parsed as (day: 6, month: 2, year: 199). Reason: Can't handle date (0, 0, 0, 6, 2, 199) at links.cfg line 167
Script Location : nph-build.cgi
Perl Version : 5.006001

164 require Time::Local;
165 my $time = 0;
166 eval {
167 $time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
168 };
169 if ($@) { die "invalid date format: $date - parsed as (day: $day, month: $months{$mon}, year: $year). Reason: $@"; }
170 return $time;

Foghat
Quote Reply
Re: [foghat] Fatal Error - Invalid Date Format In reply to
Let's see your date routines, particuarly "links.cfg line 167." Some people have added a "date fix" that needs to changed every year (the number increased by one).


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Fatal Error - Invalid Date Format In reply to
I was able to fix it...

If you look above, I did provide the data addressing line 167.

The error was in the links.db. I updated all 2099 dates to 2000 and it was fixed.