<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx</link><description>Values at or near the limits of various timestamp formats.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>A puzzle: Why are so many fake LiveJournal blogs written by 29-year-olds?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#9593689</link><pubDate>Thu, 07 May 2009 17:26:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9593689</guid><dc:creator>The Old New Thing</dc:creator><description>&lt;p&gt;At least we think they're fake.&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9593689" width="1" height="1"&gt;</description></item><item><title>Real Life Debugged  &amp;raquo; Blog Archive   &amp;raquo; Yo, Today is December 31, 1969?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#9562171</link><pubDate>Wed, 22 Apr 2009 15:56:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9562171</guid><dc:creator>Real Life Debugged  &amp;raquo; Blog Archive   &amp;raquo; Yo, Today is December 31, 1969?</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.lisaksimone.com/phoneonfire/2009/04/22/yo-today-is-december-31-1969/"&gt;http://www.lisaksimone.com/phoneonfire/2009/04/22/yo-today-is-december-31-1969/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9562171" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#488128</link><pubDate>Wed, 02 Nov 2005 15:12:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:488128</guid><dc:creator>John</dc:creator><description>The time_t typedef is a relatively recent invention, created during the the ANSI C standardization process, IIRC.  The original Unix definition of time() and related functions used &amp;quot;long&amp;quot;.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=488128" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#487532</link><pubDate>Tue, 01 Nov 2005 04:34:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487532</guid><dc:creator>Norman Diamond</dc:creator><description>Monday, October 31, 2005 2:07 PM by Ben Hutchings&lt;br&gt;&amp;gt; Norman: The Gregorian calendar was adopted&lt;br&gt;&amp;gt; in most Roman Catholic countries in 1582.&lt;br&gt;&lt;br&gt;Yikes.  I was 100 years off.  I'd better stop relying on memory before talking about non-computer stuff that way.&lt;br&gt;&lt;br&gt;I even have enough discipline to look up which argument is which in functions like memcpy almost every time I use them (because memcpy and bcopy had them in opposite orders and if I try to remember which is which then I'll remember wrong).  So I really was out of line by not looking up centuries.  I am duly chastised.&lt;br&gt;&lt;br&gt;Geez, a century.  That might even be enough time for Windows Vista beta 1 checked build to finish installing itself.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487532" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#487476</link><pubDate>Tue, 01 Nov 2005 01:20:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487476</guid><dc:creator>martynl</dc:creator><description>In VC8 (Whidbey) which just RTMed (WooHoo!), we widened time_t to 64 bits by default. It is still signed. &lt;br&gt;&lt;br&gt;You can use a #define to switch back to 32 bit time. &lt;br&gt;&lt;br&gt;We also provide specifically named time functions for the 32 bit and 64 bit versions of the type.&lt;br&gt;&lt;br&gt;Martyn Lovell&lt;br&gt;Development Lead&lt;br&gt;Visual C++ Libraries&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487476" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#487372</link><pubDate>Mon, 31 Oct 2005 21:07:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487372</guid><dc:creator>Ben Hutchings</dc:creator><description>Norman: The Gregorian calendar was adopted in most Roman Catholic countries in 1582. Britain and its colonies (including what is now the US), being Protestant by then, were slow to change over, though not as slow as e.g. Russia.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487372" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#487162</link><pubDate>Mon, 31 Oct 2005 09:54:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487162</guid><dc:creator>Andreas Magnusson</dc:creator><description>Yay, so in another 33 years we'll have another possible Y2K! Ok guys, this time we make it right! We need to scare the crap out of everyday users about the EOW so that they pay us a lot of money for fixing it!&lt;br&gt;We must henceforth use signed time_t for all times and dates in our software, especially any software going into nuclear reactors!&lt;br&gt;&lt;br&gt;Good luck! I'm counting on you guys!&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487162" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#487122</link><pubDate>Mon, 31 Oct 2005 05:36:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:487122</guid><dc:creator>Norman Diamond</dc:creator><description>&amp;gt; All of these special values have one thing&lt;br&gt;&amp;gt; in common: If you see them, it's probably a&lt;br&gt;&amp;gt; bug.&lt;br&gt;&lt;br&gt;All except one.  If you see the special value December 31, 1969, it's probably intentional.  Still unwanted but usually intentional.&lt;br&gt;&lt;br&gt;Friday, October 28, 2005 10:39 AM by Carlos&lt;br&gt;&amp;gt; Leap years follow a 400 year cycle, with&lt;br&gt;&amp;gt; 1600, 2000, etc. being the &amp;quot;most significant&amp;quot;&lt;br&gt;&amp;gt; special case.&lt;br&gt;&lt;br&gt;Actually only 2000 is, so far.  1600 is useful for computational purposes by pretending that it was part of the same cycle, but when Christians were counting 1600 years Pope Gregory hadn't been invented yet.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=487122" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#486579</link><pubDate>Sat, 29 Oct 2005 06:36:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:486579</guid><dc:creator>asdf</dc:creator><description>time_t is a signed integer for historical reasons:&lt;br&gt;- dates all the way back to when C didn't have unsigned integers&lt;br&gt;- unix's time_t is signed and the year 2038 is plenty enough of time to switch over to 64 bits. Today's programmers will be either dead or retired in that year, so it's somebody else's problem&lt;br&gt;- lots of crappy programmers assume it's signed and do subtraction on it instead of using difftime and expect it to be a negative value if the dates are backwards (even though this doesn't handle large distances correctly)&lt;br&gt;- functions return (clock_t)-1 on error and due to C's (IMHO stupid) way of doing arithmetic conversions on the comparison operators, this can result in the wrong result on some platforms under certain conditions&lt;br&gt;&lt;br&gt;C trivia: time_t/clock_t are allowed to be any arithmetic type including an unsigned integer or floating point type.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=486579" width="1" height="1"&gt;</description></item><item><title>re: How to recognize different types of sentinel timestamps from quite a long way away</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/10/28/486194.aspx#486357</link><pubDate>Fri, 28 Oct 2005 22:17:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:486357</guid><dc:creator>Raymond Chen - MSFT</dc:creator><description>Bryan: Yes, sometimes the value is signed and sometimes it's unsigned. The interpretation should be clear from context. &lt;br&gt;&lt;br&gt;&amp;quot;Any given unix-like system should treat them either as unsigned or signed, not both.&amp;quot;&lt;br&gt;&lt;br&gt;Right, but you the end user might have to deal multiple machines, some which use the signed interpretation and some which use the unsigned interpretation. So I included both, because the goal of the table was to show everything you might encounter. Writing &amp;quot;The value 0x80000000 as a time_t when interpreted on a system for which time_t is a signed type&amp;quot; would have been more precise but would have cluttered the table with information that really isn't relevant to the main point: Recognizing sentinel values.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=486357" width="1" height="1"&gt;</description></item></channel></rss>