{"id":75,"date":"2009-03-30T17:28:23","date_gmt":"2009-03-30T15:28:23","guid":{"rendered":"http:\/\/bergs.biz\/blog\/?p=75"},"modified":"2015-06-19T09:19:52","modified_gmt":"2015-06-19T07:19:52","slug":"odd-runtime-exception-due-to-leap-second","status":"publish","type":"post","link":"https:\/\/bergs.biz\/blog\/2009\/03\/30\/odd-runtime-exception-due-to-leap-second\/","title":{"rendered":"Odd runtime exception due to leap second&#8230; ;-)"},"content":{"rendered":"<p>I just discovered a highly unusual issue that really made me laugh&#8230;<\/p>\n<p>We have an application that generates event logfiles which contain, among other items, a processing time in ms. These logfiles are parsed by a different application.<\/p>\n<p>On 2009-01-01 at 00:59:59 local time (UTC+1) this application generated an exception because it couldn&#8217;t properly parse the logfile. There was a negative processing time which should never occur. WTF?!<\/p>\n<p>Considering the strange date and time and then thinking about it some fractions of a second (;-)) I immediately found the reason for this strange issue:<\/p>\n<p>Exactly at that time a so-called &#8220;<a title=\"Wikipedia: Leap second\" href=\"http:\/\/en.wikipedia.org\/wiki\/Leap_second\" target=\"_blank\">leap second<\/a>&#8221; was inserted, so that 00:59:59 occurred &#8220;twice.&#8221; And since the second occurence was just between the first and second measure point, we had a negative duration of 912 ms (instead of 88 ms.) \ud83d\ude42<\/p>\n<p>Now, is that a strange problem??? Can you beat that?! \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just discovered a highly unusual issue that really made me laugh&#8230; We have an application that generates event logfiles which contain, among other items, a processing time in ms. These logfiles are parsed by a different application. On 2009-01-01 at 00:59:59 local time (UTC+1) this application generated an exception because it couldn&#8217;t properly parse [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,11],"tags":[],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-development","category-what-the-f"],"_links":{"self":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":1,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":870,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions\/870"}],"wp:attachment":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}