Uh. Also have problem with date in some links.
My links.cfg (in Links 2.0) looks like this:
....
# --------------------------------------------------------
# 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
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