Page 1 of 2
Thought Y2k was bad ? Wait till 2038
Posted: 2003-09-05 08:47am
by Sarevok
If you are a C/C++ programmer like me chances are you already know this. Regardless I will repeat it for folks who do not know.
The C Runtime uses the time_t structure which is actualy a long integer that stores the number of seconds passed since midnight Jan 1st, 1970. Since an long int is 32 bits time_t maxes out at 2147483643 seconds. That is 68 years or in other words added to 1970 in the year 2038. That means we will be in big trouble if the C runtime library is not updated before that.
Good luck and see you in 2038 !
Posted: 2003-09-05 08:52am
by BoredShirtless
Don't panic, they will be updated.
Posted: 2003-09-05 09:33am
by Sarevok
BoredShirtless wrote:Don't panic, they will be updated.
Of course the C run time library will be be improved over time, it has been happening since the early eighties. However this particular bug was spotted around mid nineties. Those of you who use microsoft tools will be aware of several articles in developer magazines mentioning it. But so far
nothing has happened.
In reality C will inevitiably be replaced with something better by 2038 so there is a very good chance that no one will suffer from this bug.
Posted: 2003-09-05 10:46am
by zombie84
isnt this the same problem that time travelling guy who claimed to be from the future was talking about?
Posted: 2003-09-05 11:16am
by Tribun
Does it mean that all stuff, that is written in C ist then virually useless rubbish, to be kicked into the trash bin? Whow. All old Data is then lost forever, right?
Posted: 2003-09-05 11:37am
by BoredShirtless
Tribun wrote:Does it mean that all stuff, that is written in C ist then virually useless rubbish, to be kicked into the trash bin? Whow. All old Data is then lost forever, right?
The problem is in the time.h
library. If your program uses this library, all you gotta do is install the new library and recompile.
Posted: 2003-09-05 03:44pm
by Andrew J.
Does anyone even
use C/C++ anymore?
![Confused :?](./images/smilies/icon_confused.gif)
Posted: 2003-09-05 03:52pm
by BoredShirtless
Andrew J. wrote:Does anyone even
use C/C++ anymore?
![Confused :?](./images/smilies/icon_confused.gif)
Yes.
Posted: 2003-09-05 07:46pm
by Tribun
BoredShirtless wrote:Tribun wrote:Does it mean that all stuff, that is written in C ist then virually useless rubbish, to be kicked into the trash bin? Whow. All old Data is then lost forever, right?
The problem is in the time.h
library. If your program uses this library, all you gotta do is install the new library and recompile.
Can you explain a bit, what this means, and what practically would fall under that?
Posted: 2003-09-05 09:31pm
by phongn
Tribun wrote:Can you explain a bit, what this means, and what practically would fall under that?
Most people don't bother writing their own code for getting time. They use a standard library (time.h) that is included with most compilers. An update of time.h and perhaps a bit of code editing is all that is needed to correct this, in theory.
Posted: 2003-09-05 09:36pm
by DPDarkPrimus
Andrew J. wrote:Does anyone even
use C/C++ anymore?
![Confused :?](./images/smilies/icon_confused.gif)
*slaps Andrew J*
Sorry, I had to.
Posted: 2003-09-05 09:43pm
by Shinova
Andrew J. wrote:Does anyone even
use C/C++ anymore?
![Confused :?](./images/smilies/icon_confused.gif)
I believe IIRC that C/C++ is still THE language to use in game programming.
Posted: 2003-09-05 09:49pm
by Crayz9000
It's also used in almost all application programming. Why, do you think that Microsoft would write Office in FORTRAN?
Posted: 2003-09-05 09:58pm
by Darth Wong
Let's start selling some "Y2038 protection" software to scan systems for the outdated time.h library in order to rip off, er... "help protect" users.
Posted: 2003-09-05 10:03pm
by HemlockGrey
Let's start selling some "Y2038 protection" software to scan systems for the outdated time.h library in order to rip off, er... "help protect" users.
That's brilliant. You can rent some floorspace, I'll draw up the business cards, and we'll get someone else to tap out some random code-like shit.
Posted: 2003-09-05 10:33pm
by Sea Skimmer
Darth Wong wrote:Let's start selling some "Y2038 protection" software to scan systems for the outdated time.h library in order to rip off, er... "help protect" users.
It would probably sell better with a title like "Y2.038Kilo Protection Pro"
Posted: 2003-09-05 11:29pm
by Jim Raynor
Darth Wong wrote:Let's start selling some "Y2038 protection" software to scan systems for the outdated time.h library in order to rip off, er... "help protect" users.
Just wondering, what the hell was on that bogus software anyway? I remember right before 2000 came my parents got some of that crap, which I never bothered installing, not that I needed to. It had to be able to do something, right?
Posted: 2003-09-06 05:35am
by Drooling Iguana
Andrew J. wrote:Does anyone even
use C/C++ anymore?
![Confused :?](./images/smilies/icon_confused.gif)
For that, you must die.
Posted: 2003-09-06 09:01am
by The Cleric
Since we have 35 more years before we have to worry about this, I hope that MS will be able to fix what would be a real problem. BTW, did ANYTHING happen with Y2K? It just sort of went away.
Posted: 2003-09-06 01:13pm
by Crayz9000
StormTrooperTR889 wrote:BTW, did ANYTHING happen with Y2K? It just sort of went away.
Most of the problems were extremely minor. Only those people still running ancient 1970s-era mainframes had to worry about catastrophic failures, really.
Posted: 2003-09-06 04:25pm
by The Cleric
What organization could possibly get away with 70's mainframes?
Posted: 2003-09-06 05:32pm
by aphexmonster
DPDarkPrimus wrote:Andrew J. wrote:Does anyone even
use C/C++ anymore?
![Confused :?](./images/smilies/icon_confused.gif)
*slaps Andrew J*
Sorry, I had to.
Seriously, the baby jesus still rocks C++
Posted: 2003-09-06 05:40pm
by 2000AD
StormTrooperTR889 wrote:What organization could possibly get away with 70's mainframes?
Pity it wasn't Microsoft.
Posted: 2003-09-06 07:51pm
by The Cleric
Oh, that wouldn't have been pretty. The whole MS company crashing?
Posted: 2003-09-06 08:19pm
by phongn
StormTrooperTR889 wrote:What organization could possibly get away with 70's mainframes?
Major financial institutions.