Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Invalid date when importing from Links 2.0

Quote Reply
Invalid date when importing from Links 2.0
Uh. Also have problem with date in some links.

My links.cfg (in Links 2.0) looks like this:
....
Code:
sub unix_to_date {
# --------------------------------------------------------
# This routine must take a unix time and return your date format
# A much simpler routine, just make sure your format isn't so complex that
# you can't get it back into unix time.
#
my $time = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!01 02 03 04 05 06 07 08 09 10 11 12!;
$year = $year + 1900;
return "$day-$months[$mon]-$year";
}

sub long_date {
# --------------------------------------------------------
# This routine is for printing a nicer date format on the what's new page. It should
# take in a date in your current format and return a new one.
my $time = shift;
$time = &date_to_unix ($time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Siječanj Veljača Ožujak Travanj Svibanj Lipanj Srpanj Kolovoz Rujan Listopad Studeni Prosinac!;
my @days = qw!Nedjelja Ponedjeljak Utorak Srijeda Četvrtak Petak Subota!;
$year = $year + 1900;
return "$days[$dweek], $months[$mon] $day $year";
}

How to change L2S2.pm to import good date?
(my format is dd-mm-yyyy)

Thanks.

UnReal Network
Subject Author Views Date
Thread Invalid date when importing from Links 2.0 DeadMan 1854 Apr 16, 2003, 11:31 AM
Post Re: [deadroot] Invalid date when importing from Links 2.0
webmaster33 1792 Apr 20, 2003, 4:26 AM
Thread Re: [deadroot] Invalid date when importing from Links 2.0
Paul 1795 Apr 20, 2003, 5:15 AM
Thread Re: [Paul] Invalid date when importing from Links 2.0
DeadMan 1787 Apr 20, 2003, 8:20 AM
Thread Re: [deadroot] Invalid date when importing from Links 2.0
webmaster33 1781 Apr 20, 2003, 8:26 AM
Thread Re: [webmaster33] Invalid date when importing from Links 2.0
DeadMan 1780 Apr 20, 2003, 2:54 PM
Post Re: [deadroot] Invalid date when importing from Links 2.0
webmaster33 1775 Apr 20, 2003, 2:57 PM