Re: Year 2000 with online 5.01
Posted in 1997
>From: greggd09@aol.com (GreggD09) >Date: 5 Feb 1997 00:07:12 GMT >X-Informix-List-Id: <news.33445> > >We have a large application running on the Informix V5.01 database. >Currently, the year 2000 rolls over to 1900 causing errors in our >calculations. Are there any easy fixes to this problem such as a >patch or an easily upgradable new version? With the patch or new >version, how difficult of a change could we expect? We have over 150 >programs running Informix 4GL pcode. Comment 1 This means one of two things: * You aren't looking at the dates when you type them. * Your programs do not show all 4 digits of the year. I regard the second option as the more likely. The only sensible fix is to change your programs to display all 4 digits of the year. This has been true since before I4GL was introduced to the market, and will remain true into the indefinite future. >Date: Thu, 06 Feb 1997 08:22:04 -0800 >From: Susik Lee <susikl@skechers.com> >X-Informix-List-Id: <list.13017> > >At 12:07 AM 2/5/97 GMT, GreggD09 wrote: >>[...] >You might want to look at V7.2. I think it has DBCENTURY envirement where >you can set to up century. Also, I think you don't need to make any program >changes. Comment 2 Looking to 7.2 won't directly help as there is no 7.2 version of I4GL. However, one of the next releases of I4GL (currently slated to be called 4.20 and 6.10) is expected to provide DBCENTURY support. I'm not sure whether any of the 5.0x releases do support DBCENTURY, but I think not. I don't know of any releases scheduled to support DBCENTURY, but I would not be surprised to find that one of them will. However, unless you upgrade your engine, if you ever send a date to the engine as a string with 2 digits for the year, then the 5.01 engine will always add 1900 to the value. So, at the moment, there is no easy upgrade, but an upgrade to I4GL which can be used will be forthcoming -- I don't have the expected delivery dates (not even to which year, but it won't be 1996:-). Comment 1 reiterated Even if you upgrade to a version of I4GL that supports DBCENTURY, unless you display all 4 digits of the year on the screen, you won't be able to tell whether it is working correctly for you. Unless you revise the code to display the full 4-digit year, your code will be unreliable. If your application is designed to run with DBCENTURY unset, then if you type 23/01/10 (with DBDATE set to dmy4/) after 31st Dec 1999, then the value will be translated as 23rd Jan 2010. However, if someone accidentally has DBCENTURY set to P, then the value will be translated as 23rd Jan 1910 until after 2010, but you won't be able to see that something has gone wrong unless all 4 digits of the year are displayed. ************************************************************* *** PLEASE, PLEASE, PLEASE, PLEASE *** *** MAKE SURE YOU ALWAYS DISPLAY ALL 4 DIGITS OF THE YEAR *** ************************************************************* For your own sanity, please get all your code/forms which do not display 4-digit years and fix them so that they do. When you get the necessary upgrade to I4GL, then you will be able to have DBCENTURY set, and you will be able to enter 2 digits for the year, and I4GL will display the 4 digit year, and you and your users will be able to see that I4GL did what you wanted it to do. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> PS: I've been saying this to clients since 1986, long before I joined Informix. I've been saying this in c.d.i since 1991. It is still, I regret to say, necessary to reiterate it -- use 4 digits when you display dates!