{"id":1048,"date":"2015-05-11T09:03:57","date_gmt":"2015-05-11T15:03:57","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=1048"},"modified":"2015-05-16T22:02:45","modified_gmt":"2015-05-17T04:02:45","slug":"linux-time-and-the-year-2038","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/linux-time-and-the-year-2038\/","title":{"rendered":"Linux, time and the year 2038"},"content":{"rendered":"<p>Software tends to live longer than we expect, as do embedded devices running Linux. Those\u00a0that want to accurately handle time through the year 2038 and beyond will need to be updated.<\/p>\n<p>Fifteen\u00a0years after Y2K, Linux kernel developers continue to refine\u00a0support for time values that will get us past 2038. Jonathan Corbet, editor of LWN.net, explains the recent work in his typical lucid style:\u00a0<a href=\"https:\/\/lwn.net\/Articles\/643234\">https:\/\/lwn.net\/Articles\/643234<\/a><\/p>\n<p>It sounds like ext3 and NFSv3 filesystems will need to go the way of the dodo, due to lack of support for 64 bit time values, while XFS developers are working on\u00a0adding support to get us past 2038. By that time, many of us will have moved on to newer file systems.<\/p>\n<p>One comment linked to this useful bit of information on time programming on Linux systems: <a href=\"http:\/\/www.catb.org\/esr\/time-programming\/\">http:\/\/www.catb.org\/esr\/time-programming\/<\/a>, the summary is:<\/p>\n<div class=\"sect1\">\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p style=\"padding-left: 30px;\">To stay out of trouble, convert dates to Unix UTC on input, do all your calculations in that, and convert back to localtime as rare as possible. This reduces your odds of introducing a misconversion and spurious timezone skew.<\/p>\n<p>It&#8217;s also excellent advice for any back-end system that deals with data stored from devices that span a continent or the world, although it doesn&#8217;t necessarily eliminate daylight savings bugs.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Software tends to live longer than we expect, as do embedded devices running Linux. Those\u00a0that want to accurately handle time through the year 2038 and beyond will need to be updated. Fifteen\u00a0years after Y2K, Linux kernel developers continue to refine\u00a0support for time values that will get us past 2038. Jonathan Corbet, editor of LWN.net, explains &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/linux-time-and-the-year-2038\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linux, time and the year 2038&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,17],"tags":[],"class_list":["post-1048","post","type-post","status-publish","format-standard","hentry","category-linux","category-tech"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=1048"}],"version-history":[{"count":5,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1048\/revisions"}],"predecessor-version":[{"id":1059,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1048\/revisions\/1059"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=1048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=1048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=1048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}