<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: The End Of The World</title>
	<atom:link href="http://pthree.org/2007/11/26/the-end-of-the-world/feed/" rel="self" type="application/rss+xml" />
	<link>http://pthree.org/2007/11/26/the-end-of-the-world/</link>
	<description>Linux.  GNU.  Freedom.</description>
	<pubDate>Fri, 21 Nov 2008 05:28:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-beta3-9791</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mike</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-81795</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 03 Dec 2007 03:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-81795</guid>
		<description>&lt;em&gt;Confession time&lt;/em&gt;: I recently committed this sin in a production system for a bank's lending-systems brokerage service. It's not too critical: this is code to delete old records, where the timestamps are in Java time (msec since 1970) -- one of the perils of using closed-source boxed solutions from vendors who don't care about customers...

Anyway,my code checks for the wrap-around and just stops working after then (resulting in old data no longer being purged).

&lt;em&gt;This has little to do with the operating system&lt;/em&gt; (in fact, the time_t is a 64-bit value in &lt;em&gt;32-bit&lt;/em&gt; Linux too, not just in 64-bit Linux, Solaris or MacOS, plus Windows' equivalent doesn't have this bug, but one of it's own...).

In my case, this bug persists because I'm doing date arithmetic using a built-in function in MS SQL-Server 2000 which uses 32-bit integers. My actual code doesn't have the bug either (appart from running in MS-SQL Server...): it's in DATEADD and DATEDIFF. The only solutions are:
 
1) M$ fix these functions (maybe they'll do it, if they're still in business in 30 years), or 
2) replace the built-in functions with my own (I expect my own will have a lot of issues that would need extensive testing, already done for DATEADD/DATEDIFF.), or
3) Replace MS-SQLServer with a different vendor's RDBMS, which doesn't exhibit this problem (depends on what the PHBs decide, unfortunately...), or
4) Ignore it.  Our system doesn't have a 30 year life time. But then, this was the same "solution" that many coders writing COBOL financial systems code took in the 1960s...

There has to be &lt;em&gt;lots&lt;/em&gt; of places this crops up. My worst fear is that, because Y2K was such an expensive non-event, this bug and others like it will just be ignored, since Y2K never happened. My hope is that, like in my case, the implications are not life threatening and pretty easy to spot (since I've flagged it in comments, and when it stops working, it'll be noticeable that data aren't being deleted).</description>
		<content:encoded><![CDATA[<p><em>Confession time</em>: I recently committed this sin in a production system for a bank&#8217;s lending-systems brokerage service. It&#8217;s not too critical: this is code to delete old records, where the timestamps are in Java time (msec since 1970) &#8212; one of the perils of using closed-source boxed solutions from vendors who don&#8217;t care about customers&#8230;</p>
<p>Anyway,my code checks for the wrap-around and just stops working after then (resulting in old data no longer being purged).</p>
<p><em>This has little to do with the operating system</em> (in fact, the time_t is a 64-bit value in <em>32-bit</em> Linux too, not just in 64-bit Linux, Solaris or MacOS, plus Windows&#8217; equivalent doesn&#8217;t have this bug, but one of it&#8217;s own&#8230;).</p>
<p>In my case, this bug persists because I&#8217;m doing date arithmetic using a built-in function in MS SQL-Server 2000 which uses 32-bit integers. My actual code doesn&#8217;t have the bug either (appart from running in MS-SQL Server&#8230;): it&#8217;s in DATEADD and DATEDIFF. The only solutions are:</p>
<p>1) M$ fix these functions (maybe they&#8217;ll do it, if they&#8217;re still in business in 30 years), or<br />
2) replace the built-in functions with my own (I expect my own will have a lot of issues that would need extensive testing, already done for DATEADD/DATEDIFF.), or<br />
3) Replace MS-SQLServer with a different vendor&#8217;s RDBMS, which doesn&#8217;t exhibit this problem (depends on what the PHBs decide, unfortunately&#8230;), or<br />
4) Ignore it.  Our system doesn&#8217;t have a 30 year life time. But then, this was the same &#8220;solution&#8221; that many coders writing COBOL financial systems code took in the 1960s&#8230;</p>
<p>There has to be <em>lots</em> of places this crops up. My worst fear is that, because Y2K was such an expensive non-event, this bug and others like it will just be ignored, since Y2K never happened. My hope is that, like in my case, the implications are not life threatening and pretty easy to spot (since I&#8217;ve flagged it in comments, and when it stops working, it&#8217;ll be noticeable that data aren&#8217;t being deleted).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Kimber</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80772</link>
		<dc:creator>Matthew Kimber</dc:creator>
		<pubDate>Tue, 27 Nov 2007 22:51:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80772</guid>
		<description>So have you tried it out on your microwave yet?  Do microwaves even hold the date?  I guess it would depend on how much money you spent.  Perhaps I should try it on my VCR...of course that is probably a 16 or even 8-bit machine.  Hmmm...</description>
		<content:encoded><![CDATA[<p>So have you tried it out on your microwave yet?  Do microwaves even hold the date?  I guess it would depend on how much money you spent.  Perhaps I should try it on my VCR&#8230;of course that is probably a 16 or even 8-bit machine.  Hmmm&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayce^</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80731</link>
		<dc:creator>Jayce^</dc:creator>
		<pubDate>Tue, 27 Nov 2007 18:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80731</guid>
		<description>As Joseph mentions above, just changing to a 64-bit desktop/distro will *not* fix the problem.  You have to take every library, language, and bit of code that has the timestamp stored as an 32bit int (or struct) and modify them to use a larger bit of memory.  32-bits can get around it just fine, if they are willing to do it in more than one processor step (which is why they haven't until now).

But just recompiling won't change the existence of that limitation.  You gotta recode first.</description>
		<content:encoded><![CDATA[<p>As Joseph mentions above, just changing to a 64-bit desktop/distro will *not* fix the problem.  You have to take every library, language, and bit of code that has the timestamp stored as an 32bit int (or struct) and modify them to use a larger bit of memory.  32-bits can get around it just fine, if they are willing to do it in more than one processor step (which is why they haven&#8217;t until now).</p>
<p>But just recompiling won&#8217;t change the existence of that limitation.  You gotta recode first.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ubuntu 7.10 64 Bit at heyko`s</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80712</link>
		<dc:creator>Ubuntu 7.10 64 Bit at heyko`s</dc:creator>
		<pubDate>Tue, 27 Nov 2007 15:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80712</guid>
		<description>[...] in den letzten Tagen das Thema Ubuntu 64 Bit auf Planet Ubuntu vermehrt diskutiert wurde habe ich mir auch mal die 64 Bit Version von [...]</description>
		<content:encoded><![CDATA[<p>[...] in den letzten Tagen das Thema Ubuntu 64 Bit auf Planet Ubuntu vermehrt diskutiert wurde habe ich mir auch mal die 64 Bit Version von [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charly</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80621</link>
		<dc:creator>charly</dc:creator>
		<pubDate>Tue, 27 Nov 2007 02:53:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80621</guid>
		<description>glad you advise the community :&#60;), 
it kept me out of sleep for a while :o)

SOLARIS has fixed this!!, maybe we should all move to solaris ?


 froms solaris site
...." java.util.Date uses 8 bytes (a long) for millis since 1/1/1970, which is good until about the year 290,000,000. "...

http://forum.java.sun.com/thread.jspa?threadID=5194505&#38;tstart=105</description>
		<content:encoded><![CDATA[<p>glad you advise the community :&lt;),<br />
it kept me out of sleep for a while :o)</p>
<p>SOLARIS has fixed this!!, maybe we should all move to solaris ?</p>
<p> froms solaris site<br />
&#8230;.&#8221; java.util.Date uses 8 bytes (a long) for millis since 1/1/1970, which is good until about the year 290,000,000. &#8220;&#8230;</p>
<p><a href="http://forum.java.sun.com/thread.jspa?threadID=5194505&amp;tstart=105" rel="nofollow">http://forum.java.sun.com/thread.jspa?threadID=5194505&amp;tstart=105</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nixternal</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80603</link>
		<dc:creator>nixternal</dc:creator>
		<pubDate>Tue, 27 Nov 2007 00:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80603</guid>
		<description>So what you are saying is that operating system vendors have 30 years to get their stuff straight? :)  Hopefully in 30 years we will have working 64bit desktops, you know what I mean, everything builds and compiles on them just fine w/o running my 32bit chroots.

@Joseph: So I wonder who commits the first patch for an issue not due for another 30 years :)</description>
		<content:encoded><![CDATA[<p>So what you are saying is that operating system vendors have 30 years to get their stuff straight? <img src='http://pthree.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Hopefully in 30 years we will have working 64bit desktops, you know what I mean, everything builds and compiles on them just fine w/o running my 32bit chroots.</p>
<p>@Joseph: So I wonder who commits the first patch for an issue not due for another 30 years <img src='http://pthree.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Scott</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80602</link>
		<dc:creator>Joseph Scott</dc:creator>
		<pubDate>Tue, 27 Nov 2007 00:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80602</guid>
		<description>This really doesn't haven't anything to with 32 versus 64 bit operating systems.  This has to do with the time_t struct being 32 bit.  A program that casts time_t to 32 bit on a 64 bit operating system will still have problems.  The flip side is also true, a 32 bit operating system can specify a 64 bit time_t struct to deal with the issue.</description>
		<content:encoded><![CDATA[<p>This really doesn&#8217;t haven&#8217;t anything to with 32 versus 64 bit operating systems.  This has to do with the time_t struct being 32 bit.  A program that casts time_t to 32 bit on a 64 bit operating system will still have problems.  The flip side is also true, a 32 bit operating system can specify a 64 bit time_t struct to deal with the issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyrus Jones</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80595</link>
		<dc:creator>Cyrus Jones</dc:creator>
		<pubDate>Tue, 27 Nov 2007 00:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80595</guid>
		<description>Cool. I didn't know this.</description>
		<content:encoded><![CDATA[<p>Cool. I didn&#8217;t know this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TimothyP</title>
		<link>http://pthree.org/2007/11/26/the-end-of-the-world/#comment-80593</link>
		<dc:creator>TimothyP</dc:creator>
		<pubDate>Mon, 26 Nov 2007 23:45:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.pthree.org/2007/11/26/the-end-of-the-world/#comment-80593</guid>
		<description>Some people will make money out of this :-)</description>
		<content:encoded><![CDATA[<p>Some people will make money out of this <img src='http://pthree.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
