physics chemistry maths science forums
become expert I help I sign up I login
refer a friend - earn nickels!!   
 advanced
 
Home
Ask & Discuss Questions
Study Material
Experts Zone
Hang Out!

Community Contributions - Articles by goIITians


  Back to Community Shelf like the article? email it to a friend. email this article!  
  Don't try this!!!   5 Nickels awarded!
Tagged with:       [Post New]posted on 11 Mar 2007 22:45:43 IST    
Note: This is just for FYI only, Please Don't try this. This is true and if you do this then your network based applications will not work.

The Year 2038 Problem

Test it now.

steps...

1. login to yahoo messenger

2. send instant message to anyone - fine its working...

3. now, change ur system date to 19-Jan-2038, 03:14:07 AM or above

4. Confirm weather ur date is changed

5. again send instant message to anyone...

Your YM crahes....

* * * YES ALL NETWORK BASED APPLICATION WILL NOT WORK NOW * * *

Why.....

What is it?
*
*
Starting at GMT 03:14:07, Tuesday, January 19, 2038, It is  expected to see lots of systems around the world breaking magnificently: satellites falling out of orbit, massive power outages (like the 2003 North American  blackout), hospital life support system failures, phone system interruptions, banking errors, etc. One second after this critical second, many of these systems will have wildly inaccurate date settings, producing all kinds of unpredictable consequences. In short, many of the dire predictions for the year 2000 are much more likely to actually occur in the year

In the first month of the year 2038 C.E. many computers will encounter a date-related bug in their operating systems and/or in the applications they run. This can result in incorrect and wildly inaccurate dates being reported by the operating system and/or applications. The effect of this bug is hard to predict, because many applications are not prepared for the resulting "skip" in reported time anywhere from 1901 to a "broken record" repeat of the reported time at the second the bug occurs. Also, may make some small adjustment to the actual time the bug expresses itself. This bug to cause serious problems on many platforms, especially Unix and Unix-like platforms, because these systems will "run out of time".

What causes it?



Time_t is a data type used by C and C++ programs to represent dates and times internally. (Windows programmers out there might also recognize it as the basis for the CTime and CTimeSpan classes in MFC.)
time_t is actually just an integer, a whole number, that counts the number of seconds since January 1, 1970 at 12:00 AM Greenwich Mean Time. A time_t value of 0 would be 12:00:00 AM (exactly midnight) 1-Jan-1970, a time_t value of 1 would be 12:00:01 AM (one second after midnight) 1-Jan-1970, etc.. some example times and their exact time_t representations:

Date & time time_t representation

1-Jan-1970, 12:00:00 AM GMT 0

1-Jan-1970, 12:01:00 AM GMT 60

1-Jan-1970, 01:00:00 AM GMT 3 600

2-Jan-1970, 12:00:00 AM GMT 86 400

1-Jan-1971, 12:00:00 AM GMT 31 536 000

1-Jan-1972, 12:00:00 AM GMT 63 072 000

1-Jan-2038, 12:00:00 AM GMT 2 145 916 800

19-Jan-2038, 03:14:07 AM GMT 2 147 483 647



By the year 2038, the time_t representation for the current time will be over 2 140 000 000. And that's the problem. A modern 32-bit computer stores a "signed integer" data type, such as time_t, in 32 bits. The first of these bits is used for the positive/negative sign of the integer, while the remaining 31 bits are used to store the number itself.

The highest number these 31 data bits can store works out to exactly 2 147 483 647. A time_t value of this exact number, 2 147 483 647, represents January 19, 2038, at 7 seconds past 3:14 AM Greenwich Mean Time. So, at 3:14:07 AM GMT on that fateful day, every time_t used in a 32-bit C or C++ program will reach its upper limit.

One second later, on 19-January-2038 at 3:14:08 AM GMT, disaster strikes. When a signed integer reaches its maximum value and then gets incremented, it wraps around to its lowest possible negative value.

This means a 32-bit signed integer, such as a time_t, set to its maximum value of 2 147 483 647 and then incremented by 1, will become -2 147 483 648.
Note that "-" sign at the beginning of this large number. A time_t value of -2 147 483 648 would represent December 13, 1901 at 8:45:52 PM GMT.

So, if all goes normally, 19-January-2038 will suddenly become 13-December-1901 in every time_t across the globe, and every date calculation based on this figure will go haywire. And it gets worse.

Most of the support functions that use the time_t data type cannot handle negative time_t values at all. They simply fail and return an error code.
 
About the Author:
arvind1990 (293)

Blazing goIITian

Olaaa!! Perrrfect answer. 47  [76 rates]

arvind1990's Avatar

total posts: 307    
online Offline
 this article: 73 points  (with 13 Olaaa!! Perrrfect answer.   in 17 votes )   [?]
 
You have to be logged on to rate
  
vish0001
vish0001 is offline comment by vish0001    (posted on 11 Mar 2007 22:58:43 IST)
superb man !!!
karthik_abiram
karthik_abiram is offline comment by karthik_abiram    (posted on 12 Mar 2007 01:50:48 IST)
great!
vinod
vinod is offline comment by vinod    (posted on 12 Mar 2007 09:27:05 IST)
WOW WOW !!!!!!!!!!!!! Thats really gr8 1....thanks....:)
visioniit
visioniit is offline comment by visioniit    (posted on 14 Mar 2007 17:07:42 IST)
great!!!!!!
arvind1990
arvind1990 is offline comment by arvind1990    (posted on 14 Mar 2007 22:28:22 IST)
thanx..for ur comments!!!
shine
shine is offline comment by shine    (posted on 17 Mar 2007 16:36:52 IST)
wow man!!!!!!! thats amazingggggg>>
saarika
saarika is offline comment by saarika    (posted on 17 Mar 2007 17:13:27 IST)
great !!!!
paridhi_aggarwal
paridhi_aggarwal is offline comment by paridhi_aggarwal    (posted on 17 Mar 2007 17:24:40 IST)
gr8 work
nishibagaria
nishibagaria is offline comment by nishibagaria    (posted on 17 Mar 2007 19:13:30 IST)
hey dat was outstandng
arvind1990
arvind1990 is offline comment by arvind1990    (posted on 19 Mar 2007 23:44:25 IST)
Thanx...!!!
sushu
sushu is offline comment by sushu    (posted on 20 Mar 2007 00:15:24 IST)
wow!!!!!!!!!!!!!!!!! wonderful man.
prakhar_galaxy
prakhar_galaxy is offline comment by prakhar_galaxy    (posted on 20 Mar 2007 10:14:37 IST)
yaar itna computer kahan se seekha
Abe ye information khud khoji hai ya kise se copy ki hai
Are yaar mujhe nudge kar ke bata
Vaise yaar it was really mindblowing
nalini
nalini is offline comment by nalini    (posted on 20 Mar 2007 15:06:32 IST)
hey computer kid fantastic
arvind1990
arvind1990 is offline comment by arvind1990    (posted on 21 Mar 2007 17:59:23 IST)
Hey thanx...for ur comments!!!
Go to:   

Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Narayana - Kota , Delhi , Others
Brilliant Tutorials - Class , Crash
Aakash Institute - Medical , Engg
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya