Y2K38 Watch Starts Saturday 542
Jon Masters writes "I just wanted to remind everyone that Saturday, January 19th 2008 will mark the beginning of the 30-year countdown to the Y2K38 bug, when Unix time will overflow 32 bits. Some 30-year loan calculation software might start having problems with this over the weekend."
Hmmmmmm (Score:2, Funny)
*sniffs himself*
Yeah, it's the wind.
Re:Hmmmmmm (Score:5, Funny)
Re: (Score:3, Funny)
I can't wait! (Score:5, Funny)
Re:I can't wait! (Score:5, Informative)
Re:I can't wait! (Score:5, Insightful)
Re:I can't wait! (Score:4, Insightful)
File formats also have a nasty habbit of sticking arround longer than the software that works with them and file formats very often contain embedded binary date formats that were chosen simply because they were the default types for the platform in question.
Now if I can find a bank open on Saturday (Score:5, Funny)
Re:Now if I can find a bank open on Saturday (Score:5, Funny)
Re:Now if I can find a bank open on Saturday (Score:5, Funny)
Actually, I think they use floats. See, I wrote this program to - everytime there is a transaction where interest is computed, and there are millions a day, this program rounds it down to the nearest cent and puts the remainder in an account...
Re: (Score:3, Interesting)
Oh god... I forgot this is slashdot: now someone is going to spend 30 minutes composing a reply that explains how the GPL doesn't work like that....
Re: (Score:3, Interesting)
Just hope they're using signed ints to store that value.
Actually, I think they use floats.
Nope. They use two integers. One for the dollars, and one for the cents. Some older programs get fancy and use a special 4 (or 6, or 8)-byte number, where 7 (or 8) bits are used for the cents, and the rest for the dollar signs. These are known as "fixed-point fractions." The important thing to keep in mind is that floating point numbers are not accurate enough for banks.
Re:Now if I can find a bank open on Saturday (Score:4, Funny)
YOUR ESTIMATED EQUITY MAY BE AS MUCH AS $-48,331
Coincidence?
Re:Now if I can find a bank open on Saturday (Score:5, Insightful)
What loan software uses Unix time? (Score:5, Insightful)
...and requires accuracy to the nearest second? (Score:3, Insightful)
I expect loan software converts dates and lengths of time if at all to months, that being the typical interval when you compound interest. So even on 32-bit Unix
30 years? (Score:5, Funny)
Envy (Score:5, Funny)
Got hit by the Y2K bug - in 2008 (Score:3, Interesting)
Bah (Score:2)
There may be an overflow when they calculate how much interest they are paying though...
My date of birth (Score:5, Interesting)
Re:My date of birth (Score:5, Funny)
It just goes to show that true geeks will only ever almost get close enough to women for romanitc encounters.
Re: (Score:3, Funny)
Re: (Score:3, Funny)
Re: (Score:3, Funny)
Sounds good to me (Score:3, Funny)
January 19, 2038 (Score:5, Funny)
No (Score:3, Funny)
Just the Linux port of it.
64, 128, 256... (Score:2)
Re:64, 128, 256... (Score:4, Informative)
Very expensive NAS boxes still use 32-bit file time. It's odd, really.
Unix is made of *FAIL* (Score:3, Funny)
Re:Unix is made of *FAIL* (Score:5, Informative)
It's much better than that. It's mostly DCL that has the year 9999 issue. For those of you who like history lessons and how to design real operating systems (and customer support, back when it actually existed), read this article:
38 Why Is Wednesday November 17, 1858 The Base Time For VAX/VMS?
COMPONENT: SYSTEM TIME OP/SYS: VMS, Version 4.n
LAST TECHNICAL REVIEW: 06-APR-1988
SOURCE: Customer Support Center/Colorado Springs
QUESTION:
Why is Wednesday, November 17, 1858 the base time for VAX/VMS?
ANSWER:
November 17, 1858 is the base of the Modified Julian Day system.
The original Julian Day (JD) is used by astronomers and expressed in days
since noon January 1, 4713 B.C. This measure of time was introduced by
Joseph Scaliger in the 16th century. It is named in honor of his father,
Julius Caesar Scaliger (note that this Julian Day is different from the
Julian calendar named for the Roman Emperor Julius Caesar!).
Why 4713 BC? Scaliger traced three time cycles and found that they were
all in the first year of their cyle in 4713 B.C. The three cycles are 15,
19, and 28 years long. By multiplying these three numbers (15 * 19 * 28
= 7980), he was able to represent any date from 4713 B.C. through 3267 A.D.
The starting year was before any historical event known to him. In fact,
the Jewish calendar marks the start of the world as 3761 B.C. Today his
numbering scheme is still used by astronomers to avoid the difficulties of
converting the months of different calendars in use during different eras.
So why 1858? The Julian Day 2,400,000 just happens to be November 17, 1858.
The Modified Julian Day uses the following formula:
MJD = JD - 2,400,000.5
The
convenient to have their day start at noon so that nighttime observation times
fall in the middle. But they changed to conform to the commercial day.
The Modified Julian Day was adopted by the Smithsonian Astrophysical Obser-
vatory (SAO) in 1957 for satellite tracking. SAO started tracking satellites
with an 8K (non-virtual) 36-bit IBM 704 computer in 1957, when Sputnik was
launched. The Julian day was 2,435,839 on January 1, 1957. This is
11,225,377 in octal notation, which was too big to fit into an 18-bit field
(half of its standard 36-bit word). And, with only 8K of memory, no one
wanted to waste the 14 bits left over by keeping the Julian Day in its own
36-bit word. However, they also needed to track hours and minutes, for which
18 bits gave enough accuracy. So, they decided to keep the number of days in
the left 18 bits and the hours and minutes in the right 18 bits of a word.
Eighteen bits would allow the Modified Julian Day (the SAO day) to grow as
large as 262,143 ((2 ** 18) - 1). From Nov. 17, 1858, this allowed for seven
centuries. Using only 17 bits, the date could possibly grow only as large as
131,071, but this still covers 3 centuries, as well as leaving the possibility
of representing negative time. The year 1858 preceded the oldest star catalog
in use at SAO, which also avoided having to use negative time in any of the
satellite tracking calculations.
This base time of Nov. 17, 1858 has since been used by TOPS-10, TOPS-20, and
VAX/VMS. Given this base date, the 100 nanosecond granularity implemented
within VAX/VMS, and the 63-bit absolute time representation (the sign bit must
be clear), VMS should have no trouble with time until:
31-JUL-31086 02:48:05.47
At this time, all clocks and time-keeping operations within VMS will suddenly
stop, as system time values go negative.
Note that all time display and manipulation routines within VMS allow for
only 4 digits within the 'YEAR' field. We expect this to be corrected in
a future release of VAX/VMS sometime prior to 31-DEC-9999.
Re:Unix is made of *FAIL* (Score:5, Funny)
End of the world (Score:3, Insightful)
Incorrect.... (Score:5, Informative)
Re:Incorrect.... (Score:5, Funny)
Whew! It's a good thing most software is properly implemented, then.
I don't give a shit (Score:5, Funny)
Re:I don't give a shit (Score:5, Funny)
You are clearly a person who has their shit together.
What's the prevalence of use? (Score:4, Insightful)
Re:What's the prevalence of use? (Score:5, Insightful)
Why is this a problem? (Score:4, Insightful)
Furthermore, C programmers haven't exactly become a rare commodity in the intervening time like with COBOL. Y2K wasn't a problem, so why should we expect Y2K+38 to be a problem?
Here we go again, year2038.pl (Score:4, Informative)
# (or wherever your camel lives)
#Copyleft (just joking!) Georgie http://folk.uio.no/georgios
use POSIX;
use strict;
$ENV{'TZ'} = "GMT";
# GMT for preference
print "And the transition will be like...\n";
for (my $clock = 2147483646; $clock < 2147483650; $clock++)
{
print ctime($clock);
}
chomp(my $conclusion=ctime(2147483650));
if ( $conclusion=~
print "Which means that you are bugged by 32 bits. We have 64 bit processors and structures now you know!\n";} else {
print "You will survive for now. Go and get a beer. \n";}
Whew! Good thing everyone uses Windows! (Score:4, Funny)
Even more significant dates (Score:3, Informative)
Significant dates [demon.co.uk]
Y2K38? (Score:3, Insightful)
Averages causing overflows (Score:3, Interesting)
It's not a big issue and as long as programmers are aware then hopefully it will be avoided.
But there are pitfalls out there now which naive programming may fall into.
I came across this one at http://www.2038bug.com/ [2038bug.com]. We hit the 31st bit of POSIX time in 2004. That means that if you add together any two current times, for example when taking an average, then you will overflow a 32 bit signed integer.
Apologies for code quality but this artificial example hopefully shows the issue:
gives the following on my x86 Linux system:
It's easy to fix by casting to 64 bit or dividing first but there may be similar examples hiding away in old code which are less easy to spot.
Re:WTF are you talking about? (Score:5, Insightful)
Re:WTF are you talking about? (Score:4, Informative)
Re: (Score:2, Interesting)
Re: (Score:2)
Presumably, the amortization table will fall of the end of the Earth and your last payment will be due in 1970.
I must admit, I'm not going to start worrying about this stuff. Hell, that's probably longer than I'll even be alive.
Cheers
Re: (Score:3, Interesting)
Re: (Score:3, Funny)
Re: (Score:2, Informative)
Re:And other things.. (Score:5, Insightful)
Re:And other things.. (Score:4, Insightful)
I was a little appalled at the lack of coverage and donations given to the victims of the tsunami compared to the massive outpouring given to the 9/11 victims. It must just be that fact that I am in America now, and the media / government is so stuck on only looking inside the country and not what happens in other countries (unless it involves oil).
I am also continually amazed at how the governments of the world (mainly US and UK, but others too) are using the two events (9/11 and 7/7) to push all of these "security" measures. As a child growing up during the IRA bombings, I find it easy to compare the IRA to al-Qaeda, but the reactions of the governments are way out of proportion. Never did anyone think that a national ID should be implemented, and the background checks now-a-days are beyond what is needed.
If 9/11 defines that generation, then I'm so happy to be an old fart. I never would let a terrorist act define me.
Re:And other things.. (Score:5, Informative)
First I would encourage you to look at this:
http://en.wikipedia.org/wiki/Humanitarian_response_to_the_2004_Indian_Ocean_earthquake#List_of_Donors [wikipedia.org]
The United States government donated nearly one billion dollars and another 1.9 billion came from its citizens and NGOs. That's nearly 3 billion dollars total. A total of 10 billion dollars was given to relief from around the world.
Granted, that comes to around 0.0026% of our GDP (someone correct me if I'm reading that wrong, permilles aren't my strong suit), but it's still a massive out pouring of money if you ask me.
Re: (Score:3, Informative)
http://en.wikipedia.org/wiki/Humanitarian_response_to_the_2004_Indian_Ocean_earthquake [wikipedia.org]
http://en.wikipedia.org/wiki/Financial_assistance_following_the_September_11%2C_2001_attacks [wikipedia.org]
The bottom line seems to be that the government response to 9/11 was substantially larger (to compensate the victim's families, who were very high earners, and which was essentially necessary to rescue the airline insurance industry from lawsuits). Whereas the public outpouring of donations to victims
Re: (Score:3, Insightful)
'04 Tsunami was nature with man in the way. Happens all the time. The number of casualties was the only thing that was ominous. No wars out of this.
This explains the press coverage.
The "security" stuff is kind of like the old cold war crap. You know, watch out for the "red commies" or "capitalist pigs". How many trillions were spent on that? The people maki
Re: (Score:3, Informative)
Not sure what numbers you're reading. According to this [wikipedia.org] article on the Tsunami,
In all, the worldwide community donated more than $7 billion (2004 U.S. dollars) in humanitarian aid.
It's not very productive to directly compare an event with such political magnitude to a natural disaster, without taking other factors into consideration. Try comparing Hurricane Katrina to the tsunami, and then adjust for scale, for a better idea of how limited the reach of media and donations are.
IRA (Score:5, Funny)
Re: (Score:3, Insightful)
Re:And other things.. (Score:4, Informative)
What IRA are you talking about? The Provos, which is what most people refer to as the 'IRA', were responsible for somewhere around 1,800 deaths during "The Troubles", from the late '60s through the late '90s. During this same period they were responsible for approximately 20,000 wounded.
http://en.wikipedia.org/wiki/Provisional_Irish_Republican_Army#Casualties [wikipedia.org]
Their primary strategy was "A war of attrition against enemy personnel [British Army] based on causing as many deaths as possible so as to create a demand from their [the British] people at home for their withdrawal."
http://en.wikipedia.org/wiki/Provisional_Irish_Republican_Army#The_.22Long_War.22 [wikipedia.org]
'as many deaths as possible'.
Re:And other things.. (Score:5, Insightful)
We understand the causes of their frustration, and their targets were / are generally predictable.
The PIRA in particular rarely bombed without telephone warnings, usually accurate enough to allow an evacuation to take place.
Bin Laden, on the other hand, holds beliefs that are alien to our culture, and unbelievers sit next to dogs on his scale of values.
Islamic extremist bombers are unlikely ever to give adequate telephone warnings, since they value human life far less than the Catholics of the PIRA and ETA.
Having said that (and probably being of an age with you, having grown up in the late 60s and early 70s), the current rage for intrusive and unwarranted legislation is, I believe, more of a product of the CYA culture and the 'preventative approach' mentality than it is a reflection of any real threat.
Intelligence and law enforcement agencies have empires to build and budgets to inflate, and politicians have no spine in the face of public (read Daily Mail) opinion, so I see little hope of this trend ending soon.
Re:And other things.. (Score:5, Interesting)
9/11 was big because it was caused by people. The tsunami was caused by nature. Comparing responses to them is like comparing responses to a murder versus a heart attack.
Re:And other things.. (Score:4, Funny)
There, fixed that for ya... (Score:3, Insightful)
Re:And other things.. (Score:5, Funny)
Re: (Score:3, Funny)
Re:And other things.. (Score:5, Insightful)
You can come up with any number of numerological associations for any event. Seriously. Try it some time. Pick any event, and you can come up with a dozen, if you try.
Re:And other things.. (Score:5, Funny)
Really?! So there are always at least 12 numerological associations with every event in history?! OMG, I'm totally freaking out!!!11!1!
Re:And other things.. (Score:4, Funny)
There, fixed that for you.
Re:And other things.. (Score:5, Funny)
1+1=2
1*2=2
2/1=2
1+2=1
2^1=2
What does this all add up to...?
9
But don't forgot...
9 + 1*2 = 11
Who has a UID with 9 as it's most common digit?! Bob-taro!!
Whose UID without the 9s = 6+8+8 = 22, That's TWO 2s. 22 divided by 2...you guessed it... 11.
That's right...9...11. 9/11!!!
Who had the most to gain from 9/11?! Bob-taro!!
Who brought down the towers?! Bob-taro!!
Who fired a cruise missile into the Pentagon!? Bob-taro!!
And to think, Bob-taro, you almost got away with it you sneaky sonuvabitch...
Re:And other things.. (Score:5, Funny)
Re:And other things.. (Score:5, Funny)
Interesting that of all the numbers you could have mentioned, you just happened to pick dozen: the number of eggs that are most often sold together. This suggests you are a chicken farmer. Your uid is another clue: 853723. 8+5+3+7+2+3=28. 28 % 12 = 4, which happens to be your comment's score at the time I type this. 853723 %12 = 7. You bring your eggs to market every week.
Look at all I have learned about you. And you think numerology doesn't work.
Re:And other things.. (Score:4, Funny)
Interesting that of all the numbers you could have mentioned, you just happened to pick dozen: the number of eggs that are most often sold together. This suggests you are a chicken farmer. Your uid is another clue: 853723. 8+5+3+7+2+3=28. 28 % 12 = 4, which happens to be your comment's score at the time I type this. 853723 %12 = 7. You bring your eggs to market every week.
Look at all I have learned about you. And you think numerology doesn't work.
You forgot the most obvious - 853723: 8 + 5 + 3 + 7 = 23. This chicken farmer has a name: Topsy Kretts. Watch out!
Re:What about the new 40 and 50 year loans? (Score:5, Interesting)
Regardless, 40 and 50 year loans are right up there with negative amortization adjustable loans. HORRIBLE ABUSE OF TEH SYSTEM. If you have to stretch that far to get into a house, rent a fucking apartment and save up some money for cryin' out loud.
This credit crunch is a good thing, we as consumers need to get off the endless debt teat.
Re:What about the new 40 and 50 year loans? (Score:5, Informative)
The big problem of course is that most people figure their code won't be in use in 2038 and don't care. I'll be right about retirement age by then. Crap, I just realized I'm going to be the grizzled old guy they call when this problem finally rolls around. One of those crusty old farts that knows C (just like the crusty COBOL farts that got a lot of jobs back in 1999 for a few months).
Re:And other things.. (Score:5, Funny)
Re: (Score:3, Funny)
Re:2048 (Score:5, Insightful)
Re:2048 (Score:5, Funny)
Re:2038 (Score:3, Informative)
The year 2038 problem (also known as "Unix Millennium bug", "Y2K38," "Y2K+38," or "Y2.038K" by analogy to the Y2K problem) may cause some computer software to fail before or in the year 2038. The problem affects Unix-like operating systems, which represents system time as the number of seconds (ignoring leap seconds) since January 1, 1970. This representation also affects software written
Re:2048 (Score:5, Informative)
If they'd used an unsigned 32-bit number, then they would have had dates up to 2106 covered. Unfortunately whoever invented these timestamps chose to make them use signed numbers, with negative numbers being allowed on some systems (representing dates before 1970) and being errors on other systems (e.g. Windows)...
Fortunately 64-bit numbers can now be handled by pcs, and can be used as an extended timestamp to get a few billion years of time. Most operating systems have already been converted, it's just legacy programs that would have issues.
Re:2048 (Score:4, Informative)
It's got less than nothing to do with Windows, and it's not about system compatibility. The choice of a signed number was simple: at the time, timespans were encoded as negative numbers. That was removed by v2 because it caused a lot of problems in naively written code. You're presenting guesswork as fact: that's a particularly pernicious form of lying, because other people start to repeat it, thinking it's true. Quit being such a kneejerk jerk. You have no idea what you're talking about. Mechanisms for handling 64 bit numbers have been in every edition of UNIX sold or distributed for more than 20 years, since the POSIX consortium was called in 1985 to standardize the existing differing mechanisms between Ultrix, SunOS, MIPS/BSD/Mach, V8, Xenix and so on. Stop making things up to seem smart.
Whoever marked that informative should contact me for bill of sale in re: Brooklyn Bridge.
That's just postponing the inevitable. (Score:4, Funny)
Sure, we could to that, but then even if we use an unsigned number, we're still just going to be fucked again in AD 584,542,050,060.
And, by the way, 5+8+4+5+4+2+5+6 = 39, which is the number of weeks in a human pregnancy, which means the 2nd coming of Christ and the apocalypse.
All because programmers were too lazy to use 128-bit numbers to represent dates.
Re:2048 (Score:5, Informative)
As for your poorly-made argument that computers use words with certain widths, just because you've never used a computer where CHAR_BIT != 8 doesn't mean they don't exist.
Signed 12-bit (Score:5, Informative)
Re:And other things.. (Score:5, Funny)
Re: (Score:2)
Re:maybe vba has a chance to live then (Score:5, Funny)
Re: (Score:3, Funny)
Re: (Score:3, Interesting)
Re: (Score:3, Informative)
Re:The answer is 64! (Score:4, Insightful)
Re:The answer is 64! (Score:5, Interesting)
Moving to 64-bit machines won't fix all the magic 32-bit binaries out there but software that's recompiled for 64-bit machines will automagically use 64-bit ints where the programmer held the time in an int.
Of course, I've seen a lot dumber bugs than ignoring to use the operating system's time structures and methods for dealing with time so I don't doubt that there are some bugs that actually will need some serious considerations made.
I guess it's a fault of the Unix people from way back. They made this epoch thing and used a 32-bit number to store the number of seconds since it. I guess they were assuming that all their software would have been replaced by something better on bigger machines. They shouldn't have written such reliable software and then maybe some of it would have been replaced by now
Re: (Score:3, Informative)
Umm... no.
Depending on your architecture (x86, sparc for two) and compiler (sunpro for one), 64bit compilers may still define an int as 32 bits, but redefine long, time_t, size_t, ptrdiff_t etc. as 64-bits (and FYI long long is also still 64bits).
So, if an programmer has typed
int i = time(NULL);
then that code is still going to have the Y2K38 bug in it when recompiled in a 64
Re:Don't forget embedded! (Score:4, Insightful)
What. What? And this got moded "Informative"??
Re:2038!?!! (Score:4, Funny)
Doesn't matter since I hard code all my programs to fail on my 70th birthday anyway.
Just kidding.
Re:2038!?!! (Score:4, Funny)
Re: (Score:3, Informative)
My dad was actually hired by the Bank of Canada in the early 1970's to update their software to be Y2K compliant....
So yes... they were well aware of it back then. Likewise, they've been aware of the 32-bit Unix time expiry since they introduc