Re: DBCENTURY Still gives wrong date
Posted in 1997
On Tue, 30 Dec 1997, R. Kirk Waterhouse wrote: > I saw something like this on the Informix TechInfo web site. Please can you quote me a URL which will allow me to get it fixed. > It said that the date 02/29/2000 returned an invalid date error code even > with the DBCENTURY set properly. There is a bug such that: * if you have DBDATE=dmy4/ (or dmy2/) * AND you have set DBCENTURY to either F or C * AND you type '29/02/00' where a date would be expected THEN you get an error -1204 (invalid year in date). If you have a different value for DBDATE (or an implicit value for DBDATE), then the corresponding string produces the same effect. Note the odd error -- it is not -1206 (invalid day in date) as might be expected. This is PTS bug number B60150. According to the information I have available to me, it is fixed in 7.23.UC9 and 7.24.UC4 (I know it is not fixed in 7.23.UC1 and 7.24.UC1). It will be fixed in 7.30.UC1, and it has not ever been a problem with the 9.0x or later IUS versions (I know it is fixed in 9.12.UC2 IUS). I have not been able to test I4GL 4.20 or OnLine 5.10 to see whether it is a problem in these versions or not. Note that this bug is *NOT* saying that Informix is not aware that 29th February 2000 is a valid date (because 2000 is a leap year). If you type '29/02/2000', the date is accepted, in all versions of Informix SQL products, dating back to the dawn of Informix SQL products. The bug is purely in the interpretation of the 2-digit year value '00' under the constraints detailed above, and only in (some versions of) code which is DBCENTURY aware. > This is the correct response from the engine since leap years do not occur > in years that are evenly divisible by 400 (or is it 200) even though it is > evenly divisible by 4. No! Actually, I want to scream... ****NO**** You will be expected in the office on Tuesday 29th February 2000 -- unless you've been asked to resign before then for not being aware of the rules about which years are leap years. I've posted on this subject in c.d.i previously; please go to DejaNews (http://www.dejanews.com) and look for the information there. Using johnl & 2000 in the keyword search picks up 6 articles. > Jean Appleton wrote in message <688hto$bm0@cssun.mathcs.emory.edu>... > >A while back there was a news message about a date that was not > >handled properly by INFORMIX even when DBCENTURY was set up correctly. > >I believe it was a leap year and it was definitely in or after the > >year 2000. > > > >I've misplaced the orignal post and need to supply the date to my > >INFORMIX reseller. If someone has a copy of the original message or > >knows the date in question would they please send me a copy of it. Wishing you a Happy New Year... Yours, Jonathan Leffler (johnl@informix.com) #include <witticism.h>