[Tzdist] example json snips for systems that count leap seconds
Steve Allen <sla@ucolick.org> Fri, 09 January 2015 06:36 UTC
Return-Path: <sla@ucolick.org>
X-Original-To: tzdist@ietfa.amsl.com
Delivered-To: tzdist@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E1E641A86E5 for <tzdist@ietfa.amsl.com>; Thu, 8 Jan 2015 22:36:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.51
X-Spam-Level:
X-Spam-Status: No, score=-1.51 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iL4usrRDsOf6 for <tzdist@ietfa.amsl.com>; Thu, 8 Jan 2015 22:36:26 -0800 (PST)
Received: from smtp.ucolick.org (hunan.ucolick.org [128.114.23.233]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EA2131A86EC for <tzdist@ietf.org>; Thu, 8 Jan 2015 22:36:20 -0800 (PST)
Received: from smtp.ucolick.org (localhost [127.0.0.1]) by smtp.ucolick.org (Postfix) with ESMTP id CD077275A for <tzdist@ietf.org>; Thu, 8 Jan 2015 22:36:19 -0800 (PST)
Received: from geneva.ucolick.org (geneva.ucolick.org [128.114.23.183]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.ucolick.org (Postfix) with ESMTP id C72A62617 for <tzdist@ietf.org>; Thu, 8 Jan 2015 22:36:19 -0800 (PST)
Received: from geneva.ucolick.org (localhost [127.0.0.1]) by geneva.ucolick.org (8.14.4/8.13.8) with ESMTP id t096aJX8031725 for <tzdist@ietf.org>; Thu, 8 Jan 2015 22:36:19 -0800
Received: (from sla@localhost) by geneva.ucolick.org (8.14.4/8.14.4/Submit) id t096aJ9i031723 for tzdist@ietf.org; Thu, 8 Jan 2015 22:36:19 -0800
Date: Thu, 08 Jan 2015 22:36:19 -0800
From: Steve Allen <sla@ucolick.org>
To: Time Zone Data Distribution Service <tzdist@ietf.org>
Message-ID: <20150109063618.GA31637@ucolick.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="GRPZ8SYKNexpdSJ7"
Content-Disposition: inline
User-Agent: Mutt/1.5.20 (2009-12-10)
Archived-At: <http://mailarchive.ietf.org/arch/msg/tzdist/PW8brluVnzJ7inti2nUR825jrEs>
Subject: [Tzdist] example json snips for systems that count leap seconds
X-BeenThere: tzdist@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <tzdist.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tzdist>, <mailto:tzdist-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tzdist/>
List-Post: <mailto:tzdist@ietf.org>
List-Help: <mailto:tzdist-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tzdist>, <mailto:tzdist-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Jan 2015 06:36:29 -0000
Based on the work that Ken Murchison put into his example server at URLs https://cyrus-test.andrew.cmu.edu/tzdist/zones/Etc%2FTAI https://cyrus-test.andrew.cmu.edu/tzdist/zones/Etc%2FTAI/observances?start=1970-01-01T00:00:00Z&end=2038-01-01T00:00:00Z I submit more examples of how tzdist could transport the same sort of information which is currently handled by the "right" zones of the IANA tzdata and tzcode. Ken's example shows how a system which has its system clock set to UTC could compute TAI as a time zone. With added complexity in the client code for tzdist this would already be enough information to compute the value of TAI, but that added code complexity would be required in order to represent times like 23:59:60. Nevertheless, I think that the tzdist protocol already allows even a client which does not have extra code to compute the values correctly at all times other than during leap seconds. Also, there exist POSIX systems whose value of time_t does not conform to the specification. They count every leap second. For the sake of my examples I describe three such leap-counting versions of time_t 1) time_t is set such that using the POSIX routines gives the formatted time as TAI. This TAI value is as defined by BIPM. 2) time_t is set such that using the POSIX routines gives the formatted time as GPS system time. This GPS value is as defined in IS-GPS-200. 3) time_t is set such that using the POSIX routines gives the formatted time as UTC from 1970-01-01 until the first leap second on 1972-06-30. After that all leap seconds are counted such that its time_t would currently be 25 s larger than POSIX says it should be. Subsequent to 1972 this system time is the same as (TAI - 10 s). This is the time_t value expected by the "right" zones in the IANA tzdata and tzcode. Although there is no explicit definition for such a time scale it is "right" in the sense that it has counted every second which has been broadcast by transmitters which have been following the international recommendations. (A practical means by which such a time could have been maintained would be a receiver based on the LORAN-C transmissions and using their "Time of Convergence" points to establish the count of seconds, then at the retirement of LORAN-C replacing that original receiver with a GPS-based unit that provides the same TAI - 10) With that explained, the attached files have these names TAI-UTC.json shows how a system clock set to TAI could produce formatted output of UTC. GPS-UTC.json shows how a system clock set to GPS could produce formatted output of UTC. Right-UTC.json shows how a system clock set to "right" time could produce formatted output of UTC. Right-TAI.json shows how a system clock set to "right" time could produce formatted output of TAI. (This one is entirely trivial.) RightNew_York.json shows how a system clock set to "right" time could produce formatted output of New York time. This should be equivalent to what is contained in binary version of the "right" zone for New York. (I've truncated this rather than hand compute all the transitions.) In the ideal case a tzdist client with extra code to handle leap seconds would simply choose the one of TAI-UTC, GPS-UTC, or Right-UTC which is best suited to its system clock. This would get it from internal system time to UTC. Then such a client would also use tzdist to get the America/New_York data and compute its local time zone. In the case of a tzdist client without code to handle leap seconds, but with an internal system clock that is counting them, it would choose RightNew_York and that would enable it to produce formatted output that corresponds to its local time zone. I am not representing any of these zone names as canonical. If such zones are officially recognized then they will need a suitable name space with very clear descriptions of the circumstances where they are appropriate to use. Note that while I use the notions of POSIX time_t and epoch (because they are inherent in the tzcode) there is nothing about these files which restricts them to being used by POSIX systems. Also, the Chinese BeiDou satellite system and the Indian navigational satellite system each have their own uniform time scale akin to those I have used in the examples. Files akin to the ones I attach could equally well be used for system time based on transmissions from those. -- Steve Allen <sla@ucolick.org> 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
- [Tzdist] example json snips for systems that coun… Steve Allen
- Re: [Tzdist] example json snips for systems that … Martin Burnicki
- Re: [Tzdist] example json snips for systems that … Steve Allen
- Re: [Tzdist] example json snips for systems that … Paul Eggert