[tz] [PROPOSED] zic -r is incompatible with rolling leaps
Arthur David Olson
arthurdavidolson at gmail.com
Mon Sep 13 01:52:27 UTC 2021
Rolling leap seconds were meant to accommodate the New York Times Square
ball drop; at least in some leap-second years, there'd be a
"3...2...1...leap...Happy New Year" countdown, placing the leap second at
midnight New York time rather than midnight London time.
@dashdashado
On Sun, Sep 12, 2021 at 9:43 PM Paul Eggert via tz <tz at iana.org> wrote:
> * NEWS, zic.8: Mention this.
> * zic.c (leapadd): Report an error if the user tries it.
> ---
> NEWS | 3 +++
> zic.8 | 3 +++
> zic.c | 4 ++++
> 3 files changed, 10 insertions(+)
>
> diff --git a/NEWS b/NEWS
> index 1b5535a..62a7ba2 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -137,6 +137,9 @@ Unreleased, experimental changes
> last time transition disagreed with the TZ string, contrary to
> Internet RFC 8563 section 3.3.
>
> + zic -r now reports an error if given rolling leap seconds, as this
> + usage has never generally worked and is evidently unused.
> +
> zic now generates a POSIX-conforming TZ string for TZif files
> where all-year DST is predicted for the indefinite future.
> For example, for all-year Eastern Daylight Time, zic now generates
> diff --git a/zic.8 b/zic.8
> index b77841b..3023ebe 100644
> --- a/zic.8
> +++ b/zic.8
> @@ -709,6 +709,9 @@ or
> .q "Rolling"
> if the leap second time given by the other fields should be interpreted as
> local (wall clock) time.
> +(Rolling leap seconds are not supported if the
> +.B \*-r
> +option is used.)
> .PP
> The expiration line, if present, has the form:
> .nf
> diff --git a/zic.c b/zic.c
> index e2a7e13..b06ef66 100644
> --- a/zic.c
> +++ b/zic.c
> @@ -3144,6 +3144,10 @@ leapadd(zic_t t, int correction, int rolling)
> error(_("too many leap seconds"));
> exit(EXIT_FAILURE);
> }
> + if (rolling && (lo_time != min_time || hi_time != max_time)) {
> + error(_("Rolling leap seconds not supported with -r"));
> + exit(EXIT_FAILURE);
> + }
> for (i = 0; i < leapcnt; ++i)
> if (t <= trans[i])
> break;
> --
> 2.30.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20210912/6c89eb5d/attachment.htm>
More information about the tz
mailing list