Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Leap seconds and date(1)



On Sun, Jan 01, 2017 at 01:09:57AM +0100, Tom Ivar Helbekkmo wrote:
> Happy new year! :)
> 
> Being awake, I decided to observe the leap second.  Not much luck.
> Turns out that date(1) shows :59 for two seconds, instead of going to
> the correct :60 during the extra second.  Is that correct behaviour?
> 
> -tih

It's correct according to POSIX, which doesn't allow leap seconds to
exist in time_t.  It is not correct behavior according to Coordinated
Universal Time.  A TAI-based time_t epoch is somewhat fragile, and is
contrary to POSIX, but if you really want to do it, the tzcode/tzdata
has an option.

	Jonathan Kollasch



Home | Main Index | Thread Index | Old Index