Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: NANOG: users

F-ckin Leap Seconds, how do they work?

 

 

First page Previous page 1 2 3 4 5 6 Next page Last page  View All NANOG users RSS feed   Index | Next | Previous | View Threaded


roll at Stupi

Jul 5, 2012, 8:54 AM

Post #126 of 137 (329 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

> Rather than discussing the pros and cons of UTC and leap seconds, just
> create your own time system.
>
> You could call it OpenTime. OpenTime will use NTP servers where the
> Stratum 1 servers are synced to some time standard that doesn't care
> about leap seconds. That way the consumer can chose to connect his
> machines to UTC or OpenTime.

And what do you do if "OpenTime" and "UTC" differs so that it matters?

Do the fligt leave at 1200 UTC or 1200 OpenTime?

Most countries have a law that says something like "measurement is to
be traceable to a national standard" for legal and trade use. (weight,
mass, volume, current, time ...).

For those who don't knew, none of the national labs that have local
representation of UTC have the EXACT same time. So if there is a
dispute you need to be able to show traceability to YOUR national
lab.

-P


owen at delong

Jul 5, 2012, 9:33 AM

Post #127 of 137 (333 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

>>
>
> I'm only at (aproxamately) 42.28755874876601 north. Once you go near 60 north the value changes significantly.
>
> There is a band of latitudes where it does make more sense.

Why punish the rest of us to accommodate a few people who live between about 50º and 55º latitude?

Owen


jared at puck

Jul 5, 2012, 10:07 AM

Post #128 of 137 (332 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Thu, Jul 05, 2012 at 09:33:05AM -0700, Owen DeLong wrote:
> >>
> >
> > I'm only at (aproxamately) 42.28755874876601 north. Once you go near 60 north the value changes significantly.
> >
> > There is a band of latitudes where it does make more sense.
>
> Why punish the rest of us to accommodate a few people who live between about 50º and 55º latitude?

(easier typing with a real keyboard)...

This is a local/states rights issue imho :) AZ ignores DST and as a result
I never know what time it is there ;)

This is a local state-by-state and county-by-county issue as evidenced
by the behavior of counties in Indiana that are close to or within
the Chicago MSA. This is more a social issue than anything else.

Many people prefer some daylight when they are not working.

- Jared

--
Jared Mauch | pgp key available via finger from jared [at] puck
clue++; | http://puck.nether.net/~jared/ My statements are only mine.


davehart at gmail

Jul 5, 2012, 10:23 AM

Post #129 of 137 (331 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Wed, Jul 4, 2012 at 17:22 UTC, Scott Howard wrote:
> On Wed, Jul 4, 2012 at 8:50 AM, Jimmy Hess <mysidia [at] gmail> wrote:
>
>> The NTP daemon could still provide a configuration option to not
>> implement leap-seconds locally, or ignore the leap-second
>> announcement received. So the admin can make a tradeoff favoring
>> Stability over Correctness, of _allowing_ the local clock to become 1
>> second inaccurate for a short time after the rare occasion of a leap
>> second; and step it or slew the local clock, eg include the leap
>> second in the ordinary time correction, averaged over a period of
>> time instead of a 1 second jump.
>>
>
> Unless I'm mis-reading things, it already does - of sorts.

I hope anyone implementing systems that depend on minutae of leap
seconds does not rely solely on your reading, but actually tests by
inconveniently setting their clock and ntpd leapfile to actually
insert a leap second.

> According to the ntpd website (
> http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#AEN2499) :

That FAQ is woefully out of date. http://support.ntp.org/ has more
current information. The best reference for a given ntpd version is
the html docs included in the tarball for that version. Some
widely-used versions' html documentation is archived at
http://doc.ntp.org/

> *The theory of leap seconds in explained in Q: 2.4.. In reality there are
> two cases to consider:
>
> If the operating system implements the kernel discipline described in
> Section 5.2, ntpd will announce insertion and deletion of leap seconds to
> the kernel. The kernel will handle the leap seconds without further action
> necessary.

But exactly how it handles it is up to the kernel. Linux and FreeBSD
essentially step the clock backward 1s at 23:59:60.0 UTC. At least
one system (I believe it was NetBSD or OpenBSD) instead stalls the
clock for 1s, though each reading of the clock during that period is
greater than the prior, the delta is microscopic and not related to
elapsed time within that second, but simply preserves ordering of
events. Dr. Mills attempted to exhort kernel developers to implement
leap seconds while keeping the system time ever-increasing, but that
advice was largely ignored because of implementation difficulty. For
example, when first considered, NTP kernel extensions had microsecond
precision. The approach of adding a tiny amount with each reading
would open the system up to problems if apps could read the clock more
than 1 million times during the leap second. It's also ugly for a SMP
kernel to maintain global state on the last clock reading across
processors.

Most systems offer a monotonic alternative to the wall clock,
typically implemented as an uptime counter in nominal SI seconds
(nominal as defined by hardware, as the monotonic clock is _not_
disciplined by ntpd or affected by steps (setting the wall clock to a
particular value). Look for CLOCK_MONOTONIC in the documentation of
clock_gettime. There are also interval-only timer facilities like
timer_settime. The tools are at hand for those who understand the
implications of clock steps (which can occur under circumstances other
than leap seconds).

> If the operating system does not implement the kernel discipline, the
> clock will show an error of one second relative to NTP's time immediate
> after the leap second. The situation will be handled just like an
> unexpected change of time: The operating system will continue with the
> wrong time for some time, but eventually ntpd will step the time.
> Effectively this will cause the correction for leap seconds to be applied
> too late.
> *

This is the historic behavior of ntpd, but after years of complaints,
it was changed. ntpd 4.2.6 and later step the clock backward 1s at
the scheduled insertion if using the daemon loop discipline (as
opposed to the kernel loop discipline).

> Linux does implement the "kernel discipline" (via ntp_adjtime), so the
> first option is what normally happens. However you can disable this with
> an ntpd config option ("disable kernel") or via ntpdc at which point I'm
> presuming it will fall back to the second option.
>
> The second option still gives you a step, but using the -x option to NTPD
> will slew this step, giving a gradual correction to the 1 second difference.

That is incorrect. -x is often misunderstood -- it does not disable
stepping entirely, it raises the "step threshold" from 0.128s default
to 600s. When ntpd synchronizes the clock and determines the offset
exceeds the step threshold, the clock is stepped to the correct time.
So long as you manage to keep your clock within 10 minutes of correct,
-x isn't terribly different from disabling steps, but that's not what
it does.

In particular, when ntpd using the daemon loop implements a leap
second by stepping the clock backward one second, the step threshold
(and hence -x) are not a decision factor -- the step is taken.

Cheers,
Dave Hart


r.engehausen at gmail

Jul 5, 2012, 10:26 AM

Post #130 of 137 (329 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On 7/5/2012 5:54 PM, Peter Lothberg wrote:
>> Rather than discussing the pros and cons of UTC and leap seconds, just
>> create your own time system.
>>
>> You could call it OpenTime. OpenTime will use NTP servers where the
>> Stratum 1 servers are synced to some time standard that doesn't care
>> about leap seconds. That way the consumer can chose to connect his
>> machines to UTC or OpenTime.
> And what do you do if "OpenTime" and "UTC" differs so that it matters?
>
> Do the fligt leave at 1200 UTC or 1200 OpenTime?
>
> ...

Lets see. There have been nine leap seconds in 20 years. So at the
start of the next century the difference will probably be less than a minute

Remember OpenTime is only for people who want their system clocks to
ignore leap seconds. I don't include myself among the possible users of
OpenTime.


owen at delong

Jul 5, 2012, 10:42 AM

Post #131 of 137 (333 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Jul 5, 2012, at 10:07 AM, Jared Mauch wrote:

> On Thu, Jul 05, 2012 at 09:33:05AM -0700, Owen DeLong wrote:
>>>>
>>>
>>> I'm only at (aproxamately) 42.28755874876601 north. Once you go near 60 north the value changes significantly.
>>>
>>> There is a band of latitudes where it does make more sense.
>>
>> Why punish the rest of us to accommodate a few people who live between about 50º and 55º latitude?
>
> (easier typing with a real keyboard)...
>
> This is a local/states rights issue imho :) AZ ignores DST and as a result
> I never know what time it is there ;)
>
> This is a local state-by-state and county-by-county issue as evidenced
> by the behavior of counties in Indiana that are close to or within
> the Chicago MSA. This is more a social issue than anything else.
>
> Many people prefer some daylight when they are not working.

As do I... Which, if we simply go with PDT all year long, I'd basically have most of the year. I don't get that with standard time during winter anyway and PDT wouldn't help with that.

Daylight time does not add length to the daylight period of the day, it merely reduces the time between wake-up and daylight for some portion of winter time. (Standard time has become the anomaly with daylight savings time being practiced for nearly 8 months each year now).

I'm fine with leaving all the clocks permanently on daylight time. Just get rid of the twice-a-year timezone shift. I don't care what timezone we pick, just pick one and stick with it.

Owen


sla at ucolick

Jul 5, 2012, 10:42 AM

Post #132 of 137 (330 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Thu 2012-07-05T10:26:22 -0700, Roy hath writ:
> Lets see. There have been nine leap seconds in 20 years. So at the
> start of the next century the difference will probably be less than a minute

There is no predicting how large the decadal variations in LOD will be,
but the difference should be somewhere between 1 minute and 3 minutes.
Please see these charts and tables for how unpredictable it is.
http://www.ucolick.org/~sla/leapsecs/dutc.html

> Remember OpenTime is only for people who want their system clocks to
> ignore leap seconds. I don't include myself among the possible users of
> OpenTime.

Anyone who needs that can already do that using existing, deployed,
and tested code and hardware and the GPS system time scale. Please
see this worked example. Please do not invent yet another private
time scale.
http://www.ucolick.org/~sla/leapsecs/right+gps.html

--
Steve Allen <sla [at] ucolick> WGS-84 (GPS)
UCO/Lick Observatory--ISB Natural Sciences II, Room 165 Lat +36.99855
1156 High Street Voice: +1 831 459 3046 Lng -122.06015
Santa Cruz, CA 95064 http://www.ucolick.org/~sla/ Hgt +250 m


george.herbert at gmail

Jul 5, 2012, 10:46 AM

Post #133 of 137 (333 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Jul 5, 2012, at 8:14 AM, Marshall Eubanks <marshall.eubanks [at] gmail> wrote:
>
> And, by the way, the deformations and exchanges of angular momentum
> that drive Earth rotation variations are probably the best understood
> global geophysical processes there are. Absolutely no magic is
> required.


Not the tectonic ones. The deeper geophysical ones yes, but tectonics is irregular. We understand the underlying plate segment motions well but they express very irregularly over year-decade scales.


George William Herbert
Sent from my iPhone


r.engehausen at gmail

Jul 5, 2012, 11:02 AM

Post #134 of 137 (333 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On 7/5/2012 10:42 AM, Steve Allen wrote:
> On Thu 2012-07-05T10:26:22 -0700, Roy hath writ:
>> Lets see. There have been nine leap seconds in 20 years. So at the
>> start of the next century the difference will probably be less than a minute
> There is no predicting how large the decadal variations in LOD will be,
> but the difference should be somewhere between 1 minute and 3 minutes.
> Please see these charts and tables for how unpredictable it is.
> http://www.ucolick.org/~sla/leapsecs/dutc.html
>
>> Remember OpenTime is only for people who want their system clocks to
>> ignore leap seconds. I don't include myself among the possible users of
>> OpenTime.
> Anyone who needs that can already do that using existing, deployed,
> and tested code and hardware and the GPS system time scale. Please
> see this worked example. Please do not invent yet another private
> time scale.
> http://www.ucolick.org/~sla/leapsecs/right+gps.html
>
> ...

So basically the concept of OpenTime is already implemented. All that's
needed is a list of Stratum-1 servers that anyone can use.


tyler.haske at gmail

Jul 5, 2012, 11:40 AM

Post #135 of 137 (330 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Thu, Jul 5, 2012 at 2:02 PM, Roy <r.engehausen [at] gmail> wrote:
> On 7/5/2012 10:42 AM, Steve Allen wrote:
>>
>> On Thu 2012-07-05T10:26:22 -0700, Roy hath writ:
>>>
>>> Lets see. There have been nine leap seconds in 20 years. So at the
>>> start of the next century the difference will probably be less than a
>>> minute
>>
>> There is no predicting how large the decadal variations in LOD will be,
>> but the difference should be somewhere between 1 minute and 3 minutes.
>> Please see these charts and tables for how unpredictable it is.
>> http://www.ucolick.org/~sla/leapsecs/dutc.html
>>
>>> Remember OpenTime is only for people who want their system clocks to
>>> ignore leap seconds. I don't include myself among the possible users of
>>> OpenTime.
>>
>> Anyone who needs that can already do that using existing, deployed,
>> and tested code and hardware and the GPS system time scale. Please
>> see this worked example. Please do not invent yet another private
>> time scale.
>> http://www.ucolick.org/~sla/leapsecs/right+gps.html
>>
>> ...
>
>
> So basically the concept of OpenTime is already implemented. All that's
> needed is a list of Stratum-1 servers that anyone can use.

From the website:
-----
The scheme described in this web page uses a non-standard NTP server
and a non-standard set of "right" zoneinfo files. The hard part is
that the zoneinfo files must be hacked for GPS time and recompiled
whenever a leap second is announced. Hopefully that recompile happens
long before the leap second occurs. In this scheme the kernel does not
have to handle the leap second. All of the handling of the leap second
happens in the zoneinfo files. This is effectively the same as the
bi-annual handling of daylight/summer time transitions. There are no
real-time changes. Everything about the changes can be easily tested
at any time by any user.
----


Wouldn't an easier way to be separate out the timescales where one is
just 84600 seconds a day for the next 100 years, and another can keep
accurate time for those that need that kind of accuracy? The POSIX
standard can remain unchanged, and time can be monotonic.

When the cumulative difference like like 5 minutes, we can have a huge
pubic 5 year lead time thing to sync the timescales again. (Kind of
like DST, no mater how publicly and how often and how well you tell
people, folks will still show up to work late).

From the website again:
----
A system whose time_t is set using an NTP server giving GPS time (thus
the kernel does not have to handle leap seconds) and which is
configured to use the usual zoneinfo files will produce formatted
date/time strings which are 15 seconds larger than official time. (The
value 15 will increment at each leap second.)
According to the developer forums this is the variation that Google
has chosen for Android devices.
----

This seems like a good kludge. But a second is an arbitrary measure.
We might as well add leap half seconds, or leap tenths of a second.
I'd prefer leap minutes, so we can have these kinds of threads about
1/60th of the time :)

Not that I don't find this entertaining.


msa at latt

Jul 5, 2012, 11:58 AM

Post #136 of 137 (330 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Thu, Jul 05, 2012 at 01:07:04PM -0400, Jared Mauch wrote:
> This is a local/states rights issue imho :) AZ ignores DST and as a result
> I never know what time it is there ;)

AZ actually tried DST for a year, and then came to a couple of
conclusions:

1) The state with the highest insolation in the country really
has no need to conserve daylight.
2) It actually wastes energy here by driving more business
air conditoning use.

As for how it actually works:

It's very simple. I never touch my clocks unless I'm setting or
winding them. It's fantastic.

Where this falls down:

Outlook will still attempt to scramble your calendar based on
other people's silly clock change.

Your phone will tell you it's updated the clock for DST...when
it hasn't. Or worse, despite being set for no DST change, it'll do it.
Some will even lock up. There's lots and lots of broken time of day
code out there.

People don't understand the distinction between, say, Mountain
Standard Time, and Mountain Daylight Time (Equinix, I'm looking at
*YOU* -- your MST setting in the portal is not, in fact, MST. There's
no option appropriate for me at all.)

Everyone keeps asking you what time it is 'there' because they
can't wrap their brains around a static -7 offset.

Anyway, given the number of software bugs around the DST change,
the leap is the least of our worries. Perhaps we should stop rewarding
people that write bad code.

--msa


eugen at leitl

Jul 5, 2012, 12:32 PM

Post #137 of 137 (321 views)
Permalink
Re: F-ckin Leap Seconds, how do they work? [In reply to]

On Thu, Jul 05, 2012 at 10:26:22AM -0700, Roy wrote:

> Remember OpenTime is only for people who want their system clocks to
> ignore leap seconds. I don't include myself among the possible users of
> OpenTime.

Obviously you need a machine time, which is monotonous, high-resolution
(you don't need too many bits even if you resolve down to Planck time
and gigayears) and works on any planetary body or in space at any speed,
and a human time, which is dynamically derived from machine time, using
algorithms depending on particular location and occasion.

The sooner we can separate the machine time from people time, the better.

First page Previous page 1 2 3 4 5 6 Next page Last page  View All NANOG users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.