{"id":42643,"date":"2019-05-24T16:06:31","date_gmt":"2019-05-24T14:06:31","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=42643"},"modified":"2019-05-24T16:09:20","modified_gmt":"2019-05-24T14:09:20","slug":"falsehoods-programmers-believe-about-unix-time","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2019\/05\/24\/falsehoods-programmers-believe-about-unix-time\/","title":{"rendered":"Falsehoods programmers believe about Unix time"},"content":{"rendered":"<!-- google_ad_section_start -->\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"504\" height=\"390\" data-attachment-id=\"42645\" data-permalink=\"https:\/\/mamchenkov.net\/wordpress\/2019\/05\/24\/falsehoods-programmers-believe-about-unix-time\/epoch\/\" data-orig-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/epoch.png?fit=504%2C390&amp;ssl=1\" data-orig-size=\"504,390\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"epoch\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/epoch.png?fit=504%2C390&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/epoch.png?resize=504%2C390&#038;ssl=1\" alt=\"\" class=\"wp-image-42645\" srcset=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/epoch.png?w=504&amp;ssl=1 504w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/epoch.png?resize=500%2C387&amp;ssl=1 500w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A while back I blogged a collection of &#8220;<a href=\"https:\/\/mamchenkov.net\/wordpress\/2016\/03\/16\/falsehoods-programmers-believe-about\/\">Falsehoods programmers believe about &#8230;<\/a>&#8220;.  One of those things was time.  Today I came across a nice addition to that &#8211; &#8220;<a href=\"https:\/\/alexwlchan.net\/2019\/05\/falsehoods-programmers-believe-about-unix-time\/\">Falsehoods programmers believe about Unix time<\/a>&#8220;.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>These three facts all seem eminently sensible and reasonable, right?<br>1. Unix time is the number of seconds since 1 January 1970 00:00:00 UTC<br>2. If I wait exactly one second, Unix time advances by exactly one second<br>3. Unix time can never go backwards<br>False, false, false.<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">All three of these are false and for the same reason &#8211; leap seconds.  The article provides a nice and easy explanation of how and why that happens.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>A while back I blogged a collection of &#8220;Falsehoods programmers believe about &#8230;&#8220;. One of those things was time. Today I came across a nice addition to that &#8211; &#8220;Falsehoods programmers believe about Unix time&#8220;. These three facts all seem eminently sensible and reasonable, right?1. Unix time is the number of seconds since 1 January &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2019\/05\/24\/falsehoods-programmers-believe-about-unix-time\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Falsehoods programmers believe about Unix time<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Falsehoods programmers believe about Unix time #WebDev #UNIX #Linux #time ","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,18,62,1334],"tags":[253,1330],"keyring_services":[],"class_list":["post-42643","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","category-technology","category-web-work","tag-unix","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":25949,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/03\/16\/falsehoods-programmers-believe-about\/","url_meta":{"origin":42643,"position":0},"title":"Falsehoods programmers believe about &#8230;","author":"Leonid Mamchenkov","date":"March 16, 2016","format":false,"excerpt":"I thought I've posted some of these links a while back but alas I can't find them in the archives. \u00a0Maybe I just thought I did. \u00a0So here they go with some new additions: Falsehoods Programmers Believe About Names Falsehoods Programmers Believe About\u00a0Time Falsehoods Programmers Believe About\u00a0Addresses Falsehoods Programmers Believe\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":31955,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/02\/05\/dotfile-madness\/","url_meta":{"origin":42643,"position":1},"title":"Dotfile madness","author":"Leonid Mamchenkov","date":"February 5, 2019","format":false,"excerpt":"\"Dotfile madness\" is an excellent look at the problem of hidden data and configuration files that seem to be multiplying lately in the users' home directories: We are no longer in control of our home directories.My own home directory contains 25 ordinary files and 144 hidden files. The dotfiles contain\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":15856,"url":"https:\/\/mamchenkov.net\/wordpress\/2011\/11\/05\/fedora-16-dedicated-to-denis-ritchie\/","url_meta":{"origin":42643,"position":2},"title":"Fedora 16 dedicated to Dennis Ritchie","author":"Leonid Mamchenkov","date":"November 5, 2011","format":false,"excerpt":"According to the release notes of Fedora 16 (work in progress), this release of the popular Linux distribution is dedicated to Dennis Ritchie, who passed away recently. I think this is an excellent idea. During the preparation of Fedora 16, the computing world lost one of its great contributors: Dennis\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7494,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/05\/10\/vim-for-perl-developers\/","url_meta":{"origin":42643,"position":3},"title":"Vim for Perl developers","author":"Leonid Mamchenkov","date":"May 10, 2004","format":false,"excerpt":"This is my attempt to provide a clear and simple instructions on adopting Vim text editor for programming needs. I am using Perl as the programming language in the examples, but most of this document will apply equally for any other programming language. Update: This post was translated into Portuguese\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":21979,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/06\/13\/unix-history-repo-a-git-repository-representing-the-unix-source-code-history\/","url_meta":{"origin":42643,"position":4},"title":"unix-history-repo &#8211; a git repository representing the Unix source code history","author":"Leonid Mamchenkov","date":"June 13, 2014","format":"link","excerpt":"unix-history-repo - a git repository representing the Unix source code history","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":29100,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/12\/14\/unix-folklore\/","url_meta":{"origin":42643,"position":5},"title":"Unix Folklore","author":"Leonid Mamchenkov","date":"December 14, 2018","format":false,"excerpt":"Unix Folklore brings back a few bits of UNIX history from the Bell Labs: The UNIX operating system, which was created by\u00a0Ken Thompson,\u00a0Dennis Ritchie, and\u00a0others\u00a0at Bell Labs in the early 1970\u2019s, revolutionized the computer industry in ways that are still felt today. Researchers at Bell Labs continued to develop UNIX\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/12\/gremlin.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/12\/gremlin.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/12\/gremlin.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/12\/gremlin.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/12\/gremlin.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/12\/gremlin.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/42643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=42643"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/42643\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=42643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=42643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=42643"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=42643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}