A positive leap second will be introduced at the end of December 2008. The sequence of dates of the UTC second markers will be:2008 December 31, 23h 59m 59s
The difference between UTC and the International Atomic Time TAI is:
2008 December 31, 23h 59m 60s
2009 January 1, 0h 0m 0s
from 2006 January 1, 0h UTC, to 2009 January 1 0h UTC : UTC-TAI = - 33s
from 2009 January 1, 0h UTC, until further notice : UTC-TAI = - 34s
This means that tomorrow, 3:59:59 PM PST will be followed by 3:59:60 PM PST prior to the advent of 4:00:00 PM PST.
We who are subscribers knew about this in July.
What will you do with your second second?
Wait a second, wait a second. I thought they were only supposed to do this once every four millenia. This totally throws off my schedule! Who's in charge, I wanna talk to their manager!
So what are the unixtimes for each of those...
1230767999
1230768000
1230768001
??
So the leap second is 1230768001 then.
Actually the progression will be 1230767999, 1230768000, 1230768000, 1230768001. POSIX Unix time is UTC with the explicit exception that it doesn't handle leap seconds, so there is a discontinuity when leap seconds occur. The leap second is the first of the two 1230768000 numbers.
One would hope that the struct tm that you get from localtime() or gmtime() will have tm_sec=60 at the leap second, but given an ambiguous time_t as its argument, I'm not sure how that would be possible. So I assume that it never actually hits 60.
There's also some craziness about the right/ timezones that I don't fully understand the workings of.
right/ assumes that the system's idea of time_t is pseudo-TAI with the 1/1/1970 unix epoch remaining the same (as opposed to TAI which is defined as UTC+10s in 1972) On systems support it you get the full leap-second treatment (tm_sec==60, etc) Difficulties:
It's a can of worms which is why nobody does it. It's easier to just punt on the whole leap second question
The lack of an actual 60th second is cool for us lazy programmers, though. Just divide by 86400 to count the days without accounting for any weird fractions from leap seconds. Which I'd been blithely doing for years without thinking about it until our prototyping wizard started asking deep questions about Unix time during development of the Epoch Clock. Anyway, thank you, Epoch Time Gods.
Question... was the music you were listening to coincidence or on purpose?
Hi, and welcome to the JWZ livejournal. Please remember to follow the commenting guidelines, and read the FAQ.
I submit that the "International Earth Rotation Service" is possibly the coolest thing you can ever have on your business card.
I was under the impression that the Earth rotated without any assistance from giant steam engines buried beneath the Earth's crust and maintained by a shadowy organisation separate from any merely human government.
Apparently I was wrong.