lua-users home
lua-l archive

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


On Mon, May 13, 2013 at 9:54 AM, Choonster TheMage
<choonster.2010@gmail.com> wrote:
>
> os.date gets its values from a `tm` struct filled by either gmtime or
> localtime as appropriate. According to [1], the tm_secs member is in
> the range 0-61, but [2] says it's in the range 0-60.

Further googling turns up some old usenet posts where people say that
some old version of the C standard said "0-61" because the drafters
heard that there could be two leap seconds per year (i.e. June 30 and
December 31) and got confused into thinking there could be a "double
leap second" at some point in the near future.

And then there is mention that in a few tens of thousands of years the
rotation of the earth will slow enough that the day will be over 86401
seconds long, so two leap seconds would be required in a day, which
might mean a double leap second. Or, I suppose, it might mean a leap
second at 11:59:60 in addition to 23:59:60 (every day). Or it might
mean we replace UTC long before then.