Subject: | XBase.pm and the problem "year 2100" |
Date: | Thu, 15 Feb 2007 15:08:57 +0200 |
To: | bug-DBD-XBase [...] rt.cpan.org |
From: | Damyan Ivanov <dam [...] modsoftsys.com> |
Hi,
DBD::XBase version is 0.241 (debian package 1:0.241-4)
Looking at some "Use of uninitialized value in print...", coming from
XBase (see #24967), I've found what it seems to be a code, suffering
from "year 2100 problem". See for yourself:
line 666 of XBase.pm (sub update_last_change) is:
my ($y, $m, $d) = (localtime)[5, 4, 3]; $m++; $y -= 100 if $y >= 100;
The tricky part is "$y -= 100 if $y >= 100".
This makes $y to be greater than 99 after year 2099.
I think it is better to replace it with simple "$y %= 100";
Thanks for writing DBD::XBase,
dam
--
Damyan Ivanov Modular Software Systems
dam@modsoftsys.com
phone +359(2)928-2611, 929-3993 fax +359(2)920-0994
mobile +359(88)856-6067 dam@jabber.minus273.org