Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

A Diversion from elections: 2038 and the time_t problem

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » DU Groups » Computers & Internet » Computer Help and Support Group Donate to DU
 
Occulus Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Jan-10-08 02:42 AM
Original message
A Diversion from elections: 2038 and the time_t problem
First, the detailed explanation:

http://home.netcom.com/~rogermw/Y2038.html

Signed integers stored in a computer don't behave exactly like an automobile's odometer. When a 5-digit odometer reaches 99 999 miles, and then the driver goes one extra mile, the digits all "turn over" to 00000. But when a signed integer reaches its maximum value and then gets incremented, it wraps around to its lowest possible negative value. (The reasons for this have to do with a binary notation called "two's complement"; I won't bore you with the details here.) 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 then the Wiki on the subject:

http://en.wikipedia.org/wiki/Year_2038_problem

Most operating systems for 64-bit architectures already use 64-bit integers in their time_t. The move to these architectures is already underway and many expect it to be complete before 2038. Using a (signed) 64-bit value introduces a new wraparound date in about 290 billion years. However, as of 2007, hundreds of millions of 32-bit systems are deployed, many in embedded systems, and it is far from certain they will all be replaced by 2038. Despite the modern 18- to 24-month generational update in computer systems technology, embedded computers may operate unchanged for the life of the system they control. The use of 32-bit time_t has also been encoded into some file formats, which means it can live on for a long time beyond the life of the machines involved.


I know this is an esoteric subject at this point, but- is this the REAL bug that the Y2K fiasco wasn't?

I've heard about this for several years, but have never seen it actually discussed. Consider this your golden opportunity. :D What do you think- will we all be using 64- or 128-bit software by that point (thus making this a nonissue for most), will something else have come along that eliminates this problem, or are nits just being picked here?
Printer Friendly | Permalink |  | Top
RC Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Jan-10-08 11:23 AM
Response to Original message
1. I'll be 94 and if I'm still sucking air on my own then I probably won't care.
Edited on Thu Jan-10-08 11:24 AM by RC
With all the Y2K B.S. about planes falling from the sky and coffee pots and microwaves not working and digital clocks running backwards and cars stopping in the middle of the street, I ain't gonna worry about something that is scheduled to happen in 30 more years.
2000 came and went and all the unpatched machinery with embedded computers, etc. still worked just fine because their internal clock was used to flip the flops, not keep track of time. The scare mongers will confuse the two yet again and rake in bazillions from the ignorant.
Printer Friendly | Permalink |  | Top
 
DaveJ Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Jan-10-08 01:14 PM
Response to Original message
2. Interesting -- time_t never seemed 'right' to me, now I know why.
Turns out 32 bit time_t is depreciated though, so no more software or firmware should be written using it. (http://en.wikipedia.org/wiki/Time_t) We'll still be able to use 32 bit processors after 2038 that use the current double precision 64 bit value to represent time_t.
Printer Friendly | Permalink |  | Top
 
CK_John Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Jan-10-08 04:49 PM
Response to Original message
3. Maybe our outsource partners will outsource some code work to us in 2037. It's
the software stupid. Can't get too far from the election.
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sun May 05th 2024, 07:30 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Computers & Internet » Computer Help and Support Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC