Re: Y2K bug in Informix
Posted in 1998
Hi there,
This is a famous one. Bug no 60150. The engine is not able to recognize
the 29th of Feb., 2000 as a valid date. First versions that have
this bug fixed are 7.23.UC9, 7.24.UC4 and 7.30.UC1. At the beginning of
Sep there was just another thread on the same issue. I'm not sure if
this is in the FAQ or not but it looks like a good candidate to me.
Best regards,
Cristian.
Anatolii Korotkov wrote:
>
> Hello there,
> During our testing of Informix 7.22 with respect to the notorious
> 'millennium bug', I had the displeasure to see it firsthand. This
> particular bug manifests itself only under certain circumstances on the
> 29 of February, 2000. It appears that Informix Corp. is not aware of
> that, at least I could not find any recommendations or patches to deal
> with the problem. I wonder if anybody encountered this 'insect' and
> dealt with it without resorting to creating DBCENTURY-like-logic in the
> code.
>
> To replicate the conditions under which you may see the problem, do the
> following:
> (use dbaccess)
> 1) set the environment variable DBCENTURY to C, which corresponds to
> Closest;
> 2) create a table with a datetime field:
> CREATE TABLE Y2K_bug ( leap_year datetime year to day );> 3) to test DBCENTURY run queries:
> INSERT INTO Y2K_bug VALUES ('00-02-28');
> INSERT INTO Y2K_bug VALUES ('2000-02-29');> these steps should not cause any trouble - they confirm that DBCENTURY
> works as advertised in terms of figuring out what date it is, and
> Informix recognizes 2000 as a leap year;
> 4) now run the query that engages DBCENTURY and 2000 as a leap year:
> INSERT INTO Y2K_bug VALUES ('00-02-29');> it should generate the following error message:
> 1263: A field in a datetime or interval value is out of range or
> incorrect.> At least our copy of Informix 7.22 does this.
>
> --
> Have a nice day
>
> Anatolii Korotkov
> Software Engineer
> Clientlink Corp.
> (770) 663-8963 ext.185
> ======================================================
> " Many things are not clear to us.
> Though not because our perceptions are too weak,
> but because these things are not included into the
> scoup of our comprehensions."
> Koz'ma Prutkov