{"id":8041,"date":"2013-10-18T19:59:13","date_gmt":"2013-10-18T23:59:13","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=8041"},"modified":"2021-05-20T11:04:12","modified_gmt":"2021-05-20T15:04:12","slug":"fighting-a-30-year-old-software-bug","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2013\/10\/18\/fighting-a-30-year-old-software-bug\/","title":{"rendered":"Fighting a 30-year-old Software Bug"},"content":{"rendered":"<p><a href=\"http:\/\/blogs.perl.org\/users\/ovid\/2013\/10\/fighting-20-year-old-software-bugs.html\">Ovid<\/a> (via <a href=\"https:\/\/twitter.com\/optshiftk\/status\/391251011785850880\">Kyle Sluder<\/a>):<\/p><blockquote cite=\"http:\/\/blogs.perl.org\/users\/ovid\/2013\/10\/fighting-20-year-old-software-bugs.html\"><p>Remember how Lotus 1-2-3 considered 1900 a leap year and how that was faithfully copied to Excel? Because it adds an extra day to 1900, many date calculation functions relying on this can easily be off by a day. That means that 39082 <em>might<\/em> be January 1<sup>st<\/sup>, 2011 (on Macs), or it <em>might<\/em> be December 31<sup>st<\/sup>, 2006 (on Windows). If my &ldquo;year parser&rdquo; extracts 2011 from the formatted value, well, that&rsquo;s great. But since the Excel parser doesn&rsquo;t know whether it&rsquo;s a 1900 or 1904 date system, it defaults to the common 1900 date system, returns 2006 as the year, my software sees that the years are <em>five<\/em> years apart assumes an error, logs it, and returns the unformatted value.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Ovid (via Kyle Sluder):Remember how Lotus 1-2-3 considered 1900 a leap year and how that was faithfully copied to Excel? Because it adds an extra day to 1900, many date calculation functions relying on this can easily be off by a day. That means that 39082 might be January 1st, 2011 (on Macs), or it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-05-20T15:04:16Z","apple_news_api_id":"012ac2f5-8f4e-4590-a654-8144a85ecbe5","apple_news_api_modified_at":"2021-05-20T15:04:16Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AASrC9Y9ORZCmVIFEqF7L5Q","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[2070,131,30,32,609,252],"class_list":["post-8041","post","type-post","status-publish","format-standard","hentry","category-technology","tag-anniversary","tag-bug","tag-mac","tag-macapp","tag-microsoft-excel","tag-perl"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=8041"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8041\/revisions"}],"predecessor-version":[{"id":32538,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/8041\/revisions\/32538"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=8041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=8041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=8041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}