{"id":46116,"date":"2024-12-10T15:58:44","date_gmt":"2024-12-10T20:58:44","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=46116"},"modified":"2024-12-10T15:58:44","modified_gmt":"2024-12-10T20:58:44","slug":"storing-times-for-human-events","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/12\/10\/storing-times-for-human-events\/","title":{"rendered":"Storing Times for Human Events"},"content":{"rendered":"<p><a href=\"https:\/\/simonwillison.net\/2024\/Nov\/27\/storing-times-for-human-events\/\">Simon Willison<\/a>:<\/p>\n<blockquote cite=\"https:\/\/simonwillison.net\/2024\/Nov\/27\/storing-times-for-human-events\/\">\n<p>What&rsquo;s wrong with calculating the exact UTC time the event is starting and storing only that?<\/p>\n<p>[&#8230;]<\/p>\n<p>It&rsquo;s surprisingly common for countries to make decisions about DST with very little notice. Turkey and Russia and Chile and Morocco are four more examples of countries that can often cause short-term chaos for software developers in this way.<\/p>\n<p>[&#8230;]<\/p>\n<p>My strong recommendation here is that the most important thing to record is the <strong>original user&rsquo;s intent<\/strong>. If they said the event is happening at 6pm, store that! Make sure that when they go to edit their event later they see the same editable time that they entered when they first created it.<\/p>\n<p>In addition to that, try to get the most accurate possible indication of the timezone in which that event is occurring.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/04\/02\/falsehoods-about-time-and-csvs\/\">Falsehoods About Time and CSVs<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Simon Willison: What&rsquo;s wrong with calculating the exact UTC time the event is starting and storing only that? [&#8230;] It&rsquo;s surprisingly common for countries to make decisions about DST with very little notice. Turkey and Russia and Chile and Morocco are four more examples of countries that can often cause short-term chaos for software developers [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-12-10T20:58:46Z","apple_news_api_id":"be341d1f-8471-486f-aa3e-9301c08608fa","apple_news_api_modified_at":"2024-12-10T20:58:46Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AvjQdH4RxSG-qPpMBwIYI-g","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":[71,364,96],"class_list":["post-46116","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-programming","tag-time","tag-web"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46116","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=46116"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46116\/revisions"}],"predecessor-version":[{"id":46117,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46116\/revisions\/46117"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=46116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=46116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=46116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}