{"id":33573,"date":"2005-10-28T09:59:29","date_gmt":"2005-10-28T09:59:29","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2005\/10\/28\/how-to-recognize-different-types-of-sentinel-timestamps-from-quite-a-long-way-away\/"},"modified":"2005-10-28T09:59:29","modified_gmt":"2005-10-28T09:59:29","slug":"how-to-recognize-different-types-of-sentinel-timestamps-from-quite-a-long-way-away","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20051028-29\/?p=33573","title":{"rendered":"How to recognize different types of sentinel timestamps from quite a long way away"},"content":{"rendered":"<p> Some time ago, <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2003\/09\/05\/54806.aspx\"> I discussed several timestamp formats you might run into<\/a>. Today we&#8217;ll take a logical step from that information and develop a list of special values you might encounter. Note that if you apply time zone adjustments, the actual timestamp may shift by up to a day. <\/p>\n<table border=\"1\">\n<tr>\n<th valign=\"top\">Date<\/th>\n<th valign=\"top\">Interpretation     <\/th>\n<\/tr>\n<tr>\n<td valign=\"top\">January 1, 0001<\/td>\n<td valign=\"top\">The value 0 as a CLR System.DateTime.     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">January 1, 1601<\/td>\n<td valign=\"top\">The value 0 as a Win32 FILETIME.     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">December 29\/30, 1899<\/td>\n<td valign=\"top\">The value -1 or 0 as an OLE automation date.     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">December 13, 1901<\/td>\n<td valign=\"top\">The value 0x80000000 as a time_t.     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">December 31, 1969<br>January 1, 1970<\/td>\n<td valign=\"top\">The value -1 or 0 as a time_t.     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">January 1, 1980<\/td>\n<td valign=\"top\">The beginning of the DOS date\/time era.                    (Unlikely to be encountered since 0 is not a valid                    DOS date\/time value.)     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">January 19, 2038<\/td>\n<td valign=\"top\">The value 0x7FFFFFFF as a time_t.     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">February 7, 2106<\/td>\n<td valign=\"top\">The value 0xFFFFFFFF as a time_t.     <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">September 14, 30828<\/td>\n<td valign=\"top\">The value 0x7FFFFFFF`FFFFFFFF as a FILETIME.     <\/td>\n<\/tr>\n<\/table>\n<p> All of these special values have one thing in common: If you see them, it&#8217;s probably a bug. Typically they will arise when somebody <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2003\/08\/27\/54710.aspx\"> fails to do proper error checking and ends up treating an error code as if it were a valid return value<\/a>. (The special values 0, -1, and 0xFFFFFFFF are often used as error codes.) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time ago, I discussed several timestamp formats you might run into. Today we&#8217;ll take a logical step from that information and develop a list of special values you might encounter. Note that if you apply time zone adjustments, the actual timestamp may shift by up to a day. Date Interpretation January 1, 0001 The [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25,108],"class_list":["post-33573","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code","tag-time"],"acf":[],"blog_post_summary":"<p>Some time ago, I discussed several timestamp formats you might run into. Today we&#8217;ll take a logical step from that information and develop a list of special values you might encounter. Note that if you apply time zone adjustments, the actual timestamp may shift by up to a day. Date Interpretation January 1, 0001 The [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/33573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=33573"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/33573\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=33573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=33573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=33573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}