Rainman-like question on 'date' output
If I do:
Code:
$date -d 00:00:00 +%s
1436392800
(ie show me the seconds since the Epoch of today at midnight) the answer is currently an integer multiple of 3600, in other words, an integer number of full hours happened between 1970-01-01 00:00:00 UTC and 00:00:00 today. Which for most people make sense since there was an integer number days (if in UTC+0 timezone) and a day is 24x3600 seconds. For those in other time zones, we get an integer number of days plus an integer number of hours...
Not so fast.... how about leap seconds? Since they added a leap second recently (and AFAIK this isn't the first) there is no longer an integer multiple of 3600 seconds since the epoch at midnight... so I should be getting:
Code:
$date -d 00:00:00 +%s
1436392801
once the leap second has been added. Or is there a conspiracy to steal these precious seconds from our lives? Is this related to chemtrails? Inquiring minds want to know.
Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Bookmarks