DBCENTURY and Y2K
Posted in 1999
Topics: General Discussion
I am using 7.31.UC2 IDS. My DBCENTURY env var is not set. The manual says that, in this case, Informix will use the current century for 2 digit years. Depending on whom you believe, 2000 is either the last year of the 20th century OR the first year of the 21st century. (There was no year zero, so you could say that 2000 years will not have PASSED until Jan 1st, 2001). My question: If I leave DBCENTURY unset, and give Informix a date of 1/1/00 on Saturday, will it store 1/1/1900 or 1/1/2000???? Any help appreciated. allen
Whether the year 2000 is Twentieth or Twenty-First it is still century 20. This will work as expected. Of course you could just set DBCENTURY appropriately. Art S. Kagel allenj wrote: > > I am using 7.31.UC2 IDS. My DBCENTURY env var is not set. The manual > says that, in this case, Informix will use the current century for 2 > digit years. > > Depending on whom you believe, 2000 is either the last year of the 20th > century OR the first year of the 21st century. (There was no year zero, > so you could say that 2000 years will not have PASSED until Jan 1st, > 2001). > > My question: If I leave DBCENTURY unset, and give Informix a date of > 1/1/00 on Saturday, will it store 1/1/1900 or 1/1/2000???? > > Any help appreciated. > > allen
Over and above Sujit's answer, there's another question -- which century is 1900 in? If 2000 is in the 20th Century, then 1900 is in the 19th Century, and typing 00 for a year must still produce 2000 as the answer because 1900 is in the wrong century. allenj wrote: > I am using 7.31.UC2 IDS. My DBCENTURY env var is not set. The manual > says that, in this case, Informix will use the current century for 2 > digit years. > > Depending on whom you believe, 2000 is either the last year of the 20th > century OR the first year of the 21st century. (There was no year zero, > so you could say that 2000 years will not have PASSED until Jan 1st, > 2001). > > My question: If I leave DBCENTURY unset, and give Informix a date of > 1/1/00 on Saturday, will it store 1/1/1900 or 1/1/2000???? > > Any help appreciated. > > allen -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>