[177495] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: REMINDER: Leap Second

daemon@ATHENA.MIT.EDU (Valdis.Kletnieks@vt.edu)
Sun Jan 25 13:15:57 2015

X-Original-To: nanog@nanog.org
To: "John Levine" <johnl@iecc.com>
In-Reply-To: Your message of "25 Jan 2015 17:29:25 +0000."
 <20150125172925.9654.qmail@ary.lan>
From: Valdis.Kletnieks@vt.edu
Date: Sun, 25 Jan 2015 13:15:27 -0500
Cc: nanog@nanog.org
Errors-To: nanog-bounces@nanog.org

--==_Exmh_1422209727_1948P
Content-Type: text/plain; charset=us-ascii

On 25 Jan 2015 17:29:25 +0000, "John Levine" said:

> It shares with time zones the problem that you cannot tell what
> the UNIX timestamp will be for a particular future time.  If
> you want to have something happen at, say, July 2 2025 at 12:00 UTC
> you can guess what the timstamp for that will be, but if there's
> another leapsecond or two, you'll be wrong.

It shares another problem - that doing calculations across a boundary is
difficult. If you have a recurring timer that pops at 23:58:30 on June 30,
and you want another one in 2 minutes. do you want a timer that the next pop
is at 00:00:30 - or 00:00:29? The operating system can't tell whether the
desired semantic is "as close to every 120 elapsed seconds as possible" or
"as close to the half-minute tick as possible".

And of course doing interval math across several years where you cross multiple
leap seconds is even more problematic - for some corner cases that have an
endppoint nearmidnight, doing a naive "timestamp in seconds +/- 86400 * number
of days" can land you on the wrong *day*, with possibly serious consequences...


--==_Exmh_1422209727_1948P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Exmh version 2.5 07/13/2001

iQIVAwUBVMUyvwdmEQWDXROgAQKEqQ//Ul5sBmSydkEDH3OTTjAAuK4gI/96KZOK
btdCYz4B1HEREjVId41sdawL55FDCz/AfAYNzLSQ6tOCuZNZyiNZ6bIzbFyUzSat
zHKgfa2SKjbVHeHJVBpQuMjP0f/C8PIgOm4X5EE5QcTqpL2CvofVx4ke9I5l10Tz
AMFtV7OjI5L/tDbiSspjmRAZy2I7DibinhR4gt3XhpzEj6HqiN2dxe8z4NCmC1CC
ic+W0rzDcnRNp3/lKfY2UYOYIYFmj4UGKJ8v+PwzmyQjkI1hq6eWH5Iwel9cBYP2
/FO8u8CPZj1AHbh1ocio9h/3D4v5DwLDPcU/+eeHOscRABzbYW9F1nBZA1VPlv+S
kcAZgt42A+tm5EYIssP3HIZnUsqjQ098/Gw/aJnTq4xWVY1wCdH9Bd7TpQgFc7go
kTg19vjik9jLBEf4JtIAEo2f0k6tWlsI5hZJVTlV2xU0vq3NuphXzwVrsip+JCkq
AkZz6uYWyih69oThuZi+aR2CD7rN3MG5qIMaua7P20Q24Ryxtyyu4NRR30Xg+fYd
wRDeAXE3wfDV2y5oKjfqLmIfqNxKq3j73ArkQpeQ90Fpsjysd0E3H4GduUPY1HP8
kpT5T++DOq/Tel0jrYjldvaukEMrLAcdkXt7Lk6wEsLwL/ISdRItcNt0mX6xfMca
fFpXvlS9+0k=
=kdPh
-----END PGP SIGNATURE-----

--==_Exmh_1422209727_1948P--

home help back first fref pref prev next nref lref last post