nanog mailing list archives
Re: Leap Second planned for 2016
From: Jimmy Hess <mysidia () gmail com>
Date: Sun, 10 Jul 2016 13:28:29 -0500
On Sun, Jul 10, 2016 at 3:27 AM, Saku Ytti <saku () ytti fi> wrote: [snip]
a) use UTC or unix time, and accept that code is broken
[snip] The Unix time format might be an unsuitable time representation for applications which require clock precision or time precision within a few seconds for the purposes of Timestamping or synchronizing events down to a Per-Second or Subsecond resolution. Suggest revising Unix/POSIX Time implementation to use a 3-Tuple representation of calendar time, instead of a single Integer. typedef int64_t time_t [3]; [ Delta from Epoch in Seconds, Delta in Microseconds, Cumulative Leap Adjustment from the Epoch in Microseconds] Thus to compare two timestamps A and B long long difference_in_seconds(time_t A, time_t B) { return (B[0] - A[0]) + ( B[1] - A[1] + B[2] - A[2] ) /1000000; } -- -JH
Current thread:
- Re: Leap Second planned for 2016, (continued)
- Re: Leap Second planned for 2016 Eric S. Raymond (Jul 09)
- Re: Leap Second planned for 2016 A . L . M . Buxey (Jul 09)
- Re: Leap Second planned for 2016 Saku Ytti (Jul 09)
- Falsehoods programmers believe about time, etc (was Re: Leap Second planned for 2016) Jay R. Ashworth (Jul 10)
- Re: Leap Second planned for 2016 Saku Ytti (Jul 09)
- Re: Leap Second planned for 2016 Valdis . Kletnieks (Jul 09)
- RE: Leap Second planned for 2016 Keith Medcalf (Jul 09)
- Re: Leap Second planned for 2016 Saku Ytti (Jul 10)
- Re: Leap Second planned for 2016 Steve Allen (Jul 10)
- Re: Leap Second planned for 2016 Mikael Abrahamsson (Jul 10)
- Re: Leap Second planned for 2016 Jimmy Hess (Jul 10)