[tz] tzcode-2014c breaks applications that use the binary tz files

Paul Eggert eggert at cs.ucla.edu
Tue May 27 00:27:19 UTC 2014


James Cloos wrote:
> The value should be constant and avoid anything
> which could lead to a future flame war should estimates change.

Good point; we try to avoid topics that might cause flame wars.  - 2**59 
should be safe, as it's wayyy outside the error bounds, so the attached 
patch (installed in the experimental github repository) goes with that.
-------------- next part --------------
From 1421881858876f8b3b25fcfe03a974b833912e93 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert at cs.ucla.edu>
Date: Mon, 26 May 2014 17:21:38 -0700
Subject: [PATCH] zic: move Big Bang to - 2**59

This should help forestall flame wars among competing camps of physicists.
(Thanks to James Cloos.)
* NEWS, zic.8 (NOTES): Document this.
* zic.c (BIG_BANG): Use - 2**59 rather than a more-precise estimate.
---
 NEWS  |  2 +-
 zic.8 |  4 ++--
 zic.c | 20 +++++++++++---------
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/NEWS b/NEWS
index 413a4db..3ee80b5 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Unreleased, experimental changes
     This works around GNOME bug 730332
     <https://bugzilla.gnome.org/show_bug.cgi?id=730332>.
     (Thanks to Leonardo Chiquitto for reporting the bug, and to
-    Arthur David Olson for suggesting an improvement to the fix.)
+    Arthur David Olson and James Cloos for suggesting improvements to the fix.)
 
 
 Release 2014c - 2014-05-13 07:44:13 -0700
diff --git a/zic.8 b/zic.8
index 4e0bac8..5f5268c 100644
--- a/zic.8
+++ b/zic.8
@@ -520,10 +520,10 @@ To get separate transitions
 use multiple zone continuation lines
 specifying transition instants using universal time.
 .PP
-Time stamps before the Big Bang are silently omitted from the output.
+Time stamps well before the Big Bang are silently omitted from the output.
 This works around bugs in software that mishandles large negative time
 stamps.  Call it sour grapes, but pre-Big-Bang time stamps are
-physically suspect anyway.  The estimated time of the Big Bang is
+physically suspect anyway.  The pre-Big-Bang cutoff time is
 approximate and may change in future versions.
 .SH FILE
 /usr/local/etc/zoneinfo	standard directory used for created files
diff --git a/zic.c b/zic.c
index 179e4f5..07d6c30 100644
--- a/zic.c
+++ b/zic.c
@@ -724,29 +724,31 @@ static const zic_t min_time = (zic_t) -1 << (TIME_T_BITS_IN_FILE - 1);
 static const zic_t max_time = -1 - ((zic_t) -1 << (TIME_T_BITS_IN_FILE - 1));
 
 /* Estimated time of the Big Bang, in seconds since the POSIX epoch.
+   rounded downward to the negation of a power of two that is
+   comfortably outside the error bounds.
+
    zic does not output time stamps before this, partly because they
    are physically suspect, and partly because GNOME mishandles them; see
    GNOME bug 730332 <https://bugzilla.gnome.org/show_bug.cgi?id=730332>.
 
-   The following estimate for the Big Bang time is taken from:
+   For the time of the Big Bang, see:
 
    Ade PAR, Aghanim N, Armitage-Caplan C et al.  Planck 2013 results.
    I. Overview of products and scientific results.
    arXiv:1303.5062 2013-03-20 20:10:01 UTC
    <http://arxiv.org/pdf/1303.5062v1> [PDF]
 
-   Page 36, Table 9, row Age/Gyr, column Planck+WP+highL+BAO best fit,
-   gives the value 13.7965.  Multiplying this by 1000000000 and then
-   by 31557600 (the number of seconds in an astronomical year), yields
-   435384428400000000.  This estimate intentionally ignores the
-   difference between the POSIX epoch and the paper's publication
-   date, as being beneath the paper's precision.
+   Page 36, Table 9, row Age/Gyr, column Planck+WP+highL+BAO 68% limits
+   gives the value 13.798 plus-or-minus 0.037 billion years.
+   Multiplying this by 1000000000 and then by 31557600 (the number of
+   seconds in an astronomical year) gives a value that is comfortably
+   less than 2**59, so BIG_BANG is - 2**59.
 
-   This estimate is approximate, and may change in future versions.
+   BIG_BANG is approximate, and may change in future versions.
    Please do not rely on its exact value.  */
 
 #ifndef BIG_BANG
-#define BIG_BANG (-435384428400000000LL)
+#define BIG_BANG (- (1LL << 59))
 #endif
 
 static const zic_t big_bang_time = BIG_BANG;
-- 
1.9.1


More information about the tz mailing list