{"id":13476,"date":"2016-02-10T11:21:38","date_gmt":"2016-02-10T16:21:38","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=13476"},"modified":"2016-02-10T11:21:38","modified_gmt":"2016-02-10T16:21:38","slug":"dates-done-right","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/02\/10\/dates-done-right\/","title":{"rendered":"Dates, Done Right"},"content":{"rendered":"<p><a href=\"http:\/\/www.markbernstein.org\/Feb16\/DatesDoneRight.html\">Mark Bernstein<\/a>:<\/p>\n<blockquote cite=\"http:\/\/www.markbernstein.org\/Feb16\/DatesDoneRight.html\">\n<p>But, back before they invented railroads, there were no time zones. And OS X knows this! So, before time zones were introduced, the local time doesn&rsquo;t get shifted to the time zone. And, if your local time is one a different calendar date than Greenwich, you&rsquo;re off by one day!<\/p>\n<p>[&#8230;]<\/p>\n<p>No one is going to anticipate bugs like this, bugs that depend on the invention of the railroad. TDD is great, but <a href=\"http:\/\/www.rbcs-us.com\/documents\/Why-Most-Unit-Testing-is-Waste.pdf\">Coplien<\/a> is right; you&rsquo;re never going to get everything through testing.<\/p>\n<p>Apple&rsquo;s documentation policy attempts to tell you what you need to know, and no more. This gives Apple flexibility to improve OS X in small ways without breaking its implicit contract with developers, and keeps the documentation small. Here, though, the time zone behavior is completely undocumented.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Mark Bernstein: But, back before they invented railroads, there were no time zones. And OS X knows this! So, before time zones were introduced, the local time doesn&rsquo;t get shifted to the time zone. And, if your local time is one a different calendar date than Greenwich, you&rsquo;re off by one day! [&#8230;] No one [&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":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","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":[4],"tags":[131,164,30,32,71,364,1344],"class_list":["post-13476","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-documentation","tag-mac","tag-macapp","tag-programming","tag-time","tag-tinderbox"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13476","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=13476"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13476\/revisions"}],"predecessor-version":[{"id":13477,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/13476\/revisions\/13477"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=13476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=13476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=13476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}