[Y2K] inn-2.2.2/samples/innreport.in is old version ??
Matti Saarinen
mjs at cc.tut.fi
Mon Jan 3 08:11:32 UTC 2000
Fabien Tassin <fta at oleane.net> writes:
> I propose this completly untested change :
>
> Change line 479 by :
>
> my $ld = &ConvDate($last_date);
> $dy-- if $ld > $ts + 60 * ($tm + 60 * ($th + 24 * ($dd - 1 +
> substr("000031059090120151181212243273304334", $dm * 3, 3)))) ||
> $ld < &ConvDate($first_date);
>
> Can someone check this, please ?
Here is output from perl -d (perl 5.005_02 on Solaris 2.5.1).
The logs are from Jan 1st 2000.
main::(./bin/innreport:477): my $ld = &ConvDate($last_date);
DB<2>
main::(./bin/innreport:478): $dy-- if $ld > $ts + 60 * ($tm + 60 * ($th + 24 * ($dd - 1 +
main::(./bin/innreport:479): substr("000031059090120151181212243273304334", $dm * 3, 3)))) ||
main::(./bin/innreport:480): $ld < &ConvDate($first_date);
DB<2>
main::(./bin/innreport:484): ($dm, $dd, $th, $tm, $ts) = ($ddm, $d, $h, $mn, $s);
DB<2> print $dy
99
DB<3> n
main::(./bin/innreport:486): $dm++; # because January = 0 and we prefer 1
DB<3>
main::(./bin/innreport:487): $dy += 100 if $dy < 90; # Try to pacify the year 2000 !
DB<3>
main::(./bin/innreport:488): $dy += 1900;
DB<3>
main::(./bin/innreport:489): $suffix = sprintf ".%02d.%02d.%02d-%02d$SEPARATOR%02d$SEPARATOR%02d",
main::(./bin/innreport:490): $dy, $dm, $dd, $th, $tm, $ts;
DB<3> print $dy
1999
DB<4> n
main::(./bin/innreport:495): $HTML_output = "$HTML_dir"
. "/news-notice" . "$suffix" . ".html";
DB<4> print $suffix
.1999.01.01-00.00.01
--
- Matti -
More information about the inn-workers
mailing list