Re: compilation d'un document wml
Le Mon, Jun 12, 2000 at 05:20:18PM +0200, Patrice Karatchentzeff écrivait:
> ---- Contents of STDERR channel: ---------
> Can't handle date (37, 10, 17, 08, 4, 19100) at /tmp/wml.2384.tmp1 line 1017
> ------------------------------------------
Le problème ne vient pas de la config mais de la page WML en soi, il y a
un bout de code ePerl mal écrit.
Quelqu'un a écrit un truc du genre "19$year" alors qu'il fallait écrire
1900 + $year pour avoir l'année ...
C'est pour cela que vous lisez 19100 dans la ligne d'erreur au lieu de
2000 !
C'est un problème courant en perl (de moins en moins maintenant que cela
ne marche plus :-)) ... et cela doit être documenté :
[ extrait de perldoc -q 2000 ]
The date and time functions supplied with perl (gmtime and localtime)
supply adequate information to determine the year well beyond 2000
(2038 is when trouble strikes for 32-bit machines). The year returned
by these functions when used in an array context is the year minus 1900.
For years between 1910 and 1999 this I<happens> to be a 2-digit decimal
number. To avoid the year 2000 problem simply do not treat the year as
a 2-digit number. It isn't.
A+
--
Raphaël Hertzog -+- http://strasbourg.linuxfr.org/~raphael/
Reply to: