Re: [AVTCORE] Leap seconds

David Singer <singer@apple.com> Wed, 14 September 2011 22:18 UTC

Return-Path: <singer@apple.com>
X-Original-To: avt@ietfa.amsl.com
Delivered-To: avt@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 859FF21F8D66 for <avt@ietfa.amsl.com>; Wed, 14 Sep 2011 15:18:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.548
X-Spam-Level:
X-Spam-Status: No, score=-106.548 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WUS5y0MkyAtQ for <avt@ietfa.amsl.com>; Wed, 14 Sep 2011 15:18:05 -0700 (PDT)
Received: from mail-out.apple.com (mail-out.apple.com [17.151.62.50]) by ietfa.amsl.com (Postfix) with ESMTP id 3F7D521F8D64 for <avt@ietf.org>; Wed, 14 Sep 2011 15:18:05 -0700 (PDT)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_kZFR8vgIKuoezCgYswQXBw)"
Received: from relay16.apple.com ([17.128.113.55]) by mail-out.apple.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTP id <0LRJ00ABX9X71KD0@mail-out.apple.com> for avt@ietf.org; Wed, 14 Sep 2011 15:18:49 -0700 (PDT)
X-AuditID: 11807137-b7bddae0000031a0-31-4e7129c0564b
Received: from singda.apple.com (singda.apple.com [17.197.32.11]) by relay16.apple.com (Apple SCV relay) with SMTP id 7E.70.12704.0C9217E4; Wed, 14 Sep 2011 15:25:04 -0700 (PDT)
From: David Singer <singer@apple.com>
In-reply-to: <CALw1_Q2VFe3d52ufVp2wSeNCHiwqgnhLh39dQTWYa52jWLaV+g@mail.gmail.com>
Date: Wed, 14 Sep 2011 15:18:48 -0700
Message-id: <8EF3B729-407D-4A6F-9B5C-9E6833F2478B@apple.com>
References: <CALw1_Q0qK1WDc_KjEneOWrqr+jfVsqdwFYpF=ht-tS4SSNp8nQ@mail.gmail.com> <71C9EC0544D1F64D8B7D91EDCC6220200A2D0340@NABSREX027324.NAB.ORG> <alpine.BSF.2.00.1109141110001.25117@hsa.packetdesign.com> <CALw1_Q2L5z1bdVaENm7ky-epWjmxD326FLQ7THrObO_KMfdXfw@mail.gmail.com> <78481CCB-7A70-4BC4-91DC-A707301F22A5@apple.com> <CALw1_Q2VFe3d52ufVp2wSeNCHiwqgnhLh39dQTWYa52jWLaV+g@mail.gmail.com>
To: Kevin Gross <kevin.gross@avanw.com>
X-Mailer: Apple Mail (2.1084)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLLMWRmVeSWpSXmKPExsUieFSBW/eAZqGfwYn/2haPdkxntnjZs5Ld 4sWqOSwWLw61szmweFy+4u3x7+p2Zo8lS34yedw4dYoxgCWKyyYlNSezLLVI3y6BK2PDtcss BecnMFZ8a7zO0sB4obKLkYNDQsBEYuJ/zy5GTiBTTOLCvfVsXYxcHEICmxklPvd9YAZJCAso S9zadA3M5hUwlFi6qZ0dxGYWcJNYvf4eG4jNJqAq8WDOMUYQm1MgUOLHjx5WEJsFKP5z0leo +giJS/NOMYLs5RWwkZi+gBViVzuzxMJd15lAakQE1CUe7XrIBHGbrETTsowJjHyzkGyehWQz hK0tsWzha+ZZQB3MAjoSkxcyogpD2B/PH2FawMi2ilGwKDUnsdLQTC+xoCAnVS85P3cTIyiQ GwrNdzBu/yt3iFGAg1GJh5fjT4GfEGtiWXFl7iFGCQ5mJRFeoddAId6UxMqq1KL8+KLSnNTi Q4zSHCxK4rxHo3P8hATSE0tSs1NTC1KLYLJMHJxSDYwpK/ffu+eX9ueOBWNj6LwtUUblLgs+ H0x8aNSj6VL7x263x8LXm3Is8rYtZt7FucMxIcvx2cvTwT9nP56YbvB+jYfZxuZT/+a9k6rO yz9Z3eDCO91UzOD7sQlJZ+487WZT+PiqqV/W8vL8bfkqk02kcsUSv8/mKbexXrCeoe7W/Nma z+Kqzp5UYinOSDTUYi4qTgQAF76AjmACAAA=
Cc: Stephen Casner <casner@acm.org>, "Allison, Art" <AAllison@nab.org>, avt@ietf.org
Subject: Re: [AVTCORE] Leap seconds
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Audio/Video Transport Core Maintenance <avt.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/avt>, <mailto:avt-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/avt>
List-Post: <mailto:avt@ietf.org>
List-Help: <mailto:avt-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Sep 2011 22:18:06 -0000

OK, I am not an expert, but 1305 does say:

The insertion of leap seconds in UTC and subsequently
into NTP does not affect the UTC or NTP oscillator, only the conversion
to conventional civil UTC time.


On Sep 14, 2011, at 12:54 , Kevin Gross wrote:

> RFC 5905 indicates that the 64-bit NTP timestamps used by the NTP protocol are a bit more complex than that. Specifically, these NTP timestamps have discontinuities around leap seconds. RFC 3550 does not spell it out exactly but I assume the 64-bit NTP timestamp in the RTCP sender report sould behave according to the definition in RFC 5905.
> 
> Kevin
> 
> On Wed, Sep 14, 2011 at 1:02 PM, David Singer <singer@apple.com> wrote:
> 
> On Sep 14, 2011, at 11:49 , Kevin Gross wrote:
> 
>> To be clear, "Those issues" refers to the year 2038 problem.
>> 
>> By my reading, my original concern about leap seconds is not addressed in this excerpt or anywhere else in the RFC. I'm hoping to see some additional discussion about that.
> 
> NTP timestamp are, as I recall, simply counts of seconds and fractions of seconds since a well-defined origin.  How you choose to interpret and display that count is entirely up to you; I don't think RTP really cares which year something happened in, for example.  You could use any calendar system you like..
> 
>> 
>> I do recognize that the unsynchronized clock option allows me to replace NTP time with 1588 time. Apparently I should set the MS bit in the timestamps if I do this (and possibly expect problems after 2038).
>> 
>> Kevin
>> 
>> On Wed, Sep 14, 2011 at 12:11 PM, Stephen Casner <casner@acm.org> wrote:
>> Those issues are addressed in RFC 3550:
>> 
>>   Wallclock time (absolute date and time) is represented using the
>>   timestamp format of the Network Time Protocol (NTP), which is in
>>   seconds relative to 0h UTC on 1 January 1900 [4].  The full
>>   resolution NTP timestamp is a 64-bit unsigned fixed-point number with
>>   the integer part in the first 32 bits and the fractional part in the
>>   last 32 bits.  In some fields where a more compact representation is
>>   appropriate, only the middle 32 bits are used; that is, the low 16
>>   bits of the integer part and the high 16 bits of the fractional part.
>>   The high 16 bits of the integer part must be determined
>>   independently.
>> 
>>   An implementation is not required to run the Network Time Protocol in
>>   order to use RTP.  Other time sources, or none at all, may be used
>>   (see the description of the NTP timestamp field in Section 6.4.1).
>>   However, running NTP may be useful for synchronizing streams
>>   transmitted from separate hosts.
>> 
>>   The NTP timestamp will wrap around to zero some time in the year
>>   2036, but for RTP purposes, only differences between pairs of NTP
>>   timestamps are used.  So long as the pairs of timestamps can be
>>   assumed to be within 68 years of each other, using modular arithmetic
>>   for subtractions and comparisons makes the wraparound irrelevant.
>> 
>> The timestamp is not required to be synchronized with UTC at all.  For
>> some applications it would be convenient to use UTC in order to
>> synchronize the RTP stream with some other kinds of events, but RTP
>> does not require it.
>> 
>>                                                        -- Steve
>> 
>> On Wed, 14 Sep 2011, Allison, Art wrote:
>> 
>> > As I understand it the UTC clock will monotonically increase after
>> > January 2017 (no more leap seconds). What happens at 03:14:07 UTC
>> > <http://en.wikipedia.org/wiki/Coordinated_Universal_Time>  on Tuesday,
>> > 19 January 2038 (32 bit count overflow) will need to be addressed by
>> > someone, - your guess if any equipment being built today will be in
>> > service then.
>> >
>> > See
>> > http://www.agi.com/downloads/resources/white-papers/Debate-Over-UTC-and-
>> > Leap-Seconds.pdf  for more information.
>> >
>> >
>> >
>> >
>> >
>> > Art Allison
>> > Senior Director Advanced Engineering, Science and Technology
>> > National Association of Broadcasters
>> > 1771 N Street NW
>> > Washington, DC 20036
>> > Phone  202 429 5418
>> > Fax  202 775 4981
>> > www.nab.org <blocked::http://www.nab.org>
>> > Advocacy  Education  Innovation
>> >
>> > From: avt-bounces@ietf.org [mailto:avt-bounces@ietf.org] On Behalf Of
>> > Kevin Gross
>> > Sent: Wednesday, September 14, 2011 1:22 PM
>> > To: avt@ietf.org
>> > Subject: [AVTCORE] Leap seconds
>> >
>> >
>> >
>> > I am working on a means of using an IEEE 1588 timebase for RTP
>> > streaming. I am aware of IEEE 1733 and will use that if necessary. First
>> > I am exploring using existing NTP mapping function in RTCP sender
>> > reports. While researching how to translate a 1588 timestamp to its NTP
>> > equivalent, I was reminded of the wrinkle leap seconds put into things.
>> >
>> >
>> >
>> > The RTCP sender report maps RTP timestamps to NTP timestamps. RTP
>> > timestamps are monotonically increasing. The RTP timestamps are based on
>> > UTC and have an occasional wobble due to leap seconds. During the leap
>> > second, there is an ambiguous mapping between RTP and NTP/UTC. I find no
>> > recommendations in RFC 3550 for dealing with this.
>> >
>> >
>> >
>> > --
>> >
>> > Kevin Gross
>> >
>> > AVA Networks
>> >
>> > +1-303-447-0517
>> >
>> >
>> >
>> >
>> _______________________________________________
>> Audio/Video Transport Core Maintenance
>> avt@ietf.org
>> https://www.ietf.org/mailman/listinfo/avt
>> 
>> 
>> _______________________________________________
>> Audio/Video Transport Core Maintenance
>> avt@ietf.org
>> https://www.ietf.org/mailman/listinfo/avt
> 
> David Singer
> Multimedia and Software Standards, Apple Inc.
> 
> 
> 
> 
> -- 
> Kevin Gross
> AVA Networks
> +1-303-447-0517
> 

David Singer
Multimedia and Software Standards, Apple Inc.