Sync our copy of the timezone library with IANA release tzcode2017c.
This is a trivial update containing only cosmetic changes. The point is just to get back to being synced with an official release of tzcode, rather than some ad-hoc point in their commit history, which is where commit 47f849a3c left it.
This commit is contained in:
parent
f3ea3e3e82
commit
24a1897ab9
@ -50,7 +50,7 @@ match properly on the old version.
|
|||||||
Time Zone code
|
Time Zone code
|
||||||
==============
|
==============
|
||||||
|
|
||||||
The code in this directory is currently synced with tzcode release 2017b.
|
The code in this directory is currently synced with tzcode release 2017c.
|
||||||
There are many cosmetic (and not so cosmetic) differences from the
|
There are many cosmetic (and not so cosmetic) differences from the
|
||||||
original tzcode library, but diffs in the upstream version should usually
|
original tzcode library, but diffs in the upstream version should usually
|
||||||
be propagated to our version. Here are some notes about that.
|
be propagated to our version. Here are some notes about that.
|
||||||
|
@ -802,8 +802,8 @@ transtime(int year, const struct rule *rulep,
|
|||||||
{
|
{
|
||||||
bool leapyear;
|
bool leapyear;
|
||||||
int32 value;
|
int32 value;
|
||||||
int i,
|
int i;
|
||||||
d,
|
int d,
|
||||||
m1,
|
m1,
|
||||||
yy0,
|
yy0,
|
||||||
yy1,
|
yy1,
|
||||||
|
@ -119,8 +119,7 @@ static char *_yconv(int, int, bool, bool, char *, const char *);
|
|||||||
|
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
pg_strftime(char *s, size_t maxsize, const char *format,
|
pg_strftime(char *s, size_t maxsize, const char *format, const struct pg_tm *t)
|
||||||
const struct pg_tm *t)
|
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
enum warn warn = IN_NONE;
|
enum warn warn = IN_NONE;
|
||||||
@ -228,9 +227,9 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
|
|||||||
case 'k':
|
case 'k':
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This used to be... _conv(t->tm_hour % 12 ? t->tm_hour
|
* This used to be... _conv(t->tm_hour % 12 ? t->tm_hour %
|
||||||
* % 12 : 12, 2, ' '); ...and has been changed to the
|
* 12 : 12, 2, ' '); ...and has been changed to the below
|
||||||
* below to match SunOS 4.1.1 and Arnold Robbins' strftime
|
* to match SunOS 4.1.1 and Arnold Robbins' strftime
|
||||||
* version 3.0. That is, "%k" and "%l" have been swapped.
|
* version 3.0. That is, "%k" and "%l" have been swapped.
|
||||||
* (ado, 1993-05-24)
|
* (ado, 1993-05-24)
|
||||||
*/
|
*/
|
||||||
@ -248,7 +247,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
|
|||||||
case 'l':
|
case 'l':
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This used to be... _conv(t->tm_hour, 2, ' '); ...and
|
* This used to be... _conv(t->tm_hour, 2, ' '); ...and
|
||||||
* has been changed to the below to match SunOS 4.1.1 and
|
* has been changed to the below to match SunOS 4.1.1 and
|
||||||
* Arnold Robbin's strftime version 3.0. That is, "%k" and
|
* Arnold Robbin's strftime version 3.0. That is, "%k" and
|
||||||
* "%l" have been swapped. (ado, 1993-05-24)
|
* "%l" have been swapped. (ado, 1993-05-24)
|
||||||
@ -312,7 +311,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
|
|||||||
* (01-53)."
|
* (01-53)."
|
||||||
* (ado, 1993-05-24)
|
* (ado, 1993-05-24)
|
||||||
*
|
*
|
||||||
* From <http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html> by Markus Kuhn:
|
* From <https://www.cl.cam.ac.uk/~mgk25/iso-time.html> by Markus Kuhn:
|
||||||
* "Week 01 of a year is per definition the first week which has the
|
* "Week 01 of a year is per definition the first week which has the
|
||||||
* Thursday in this year, which is equivalent to the week which contains
|
* Thursday in this year, which is equivalent to the week which contains
|
||||||
* the fourth day of January. In other words, the first week of a new year
|
* the fourth day of January. In other words, the first week of a new year
|
||||||
@ -482,7 +481,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* X311J/88-090 (4.12.3.5): if conversion char is
|
* X311J/88-090 (4.12.3.5): if conversion char is
|
||||||
* undefined, behavior is undefined. Print out the
|
* undefined, behavior is undefined. Print out the
|
||||||
* character itself as printf(3) also does.
|
* character itself as printf(3) also does.
|
||||||
*/
|
*/
|
||||||
default:
|
default:
|
||||||
|
@ -50,8 +50,8 @@ struct tzhead
|
|||||||
* tzh_timecnt (unsigned char)s types of local time starting at above
|
* tzh_timecnt (unsigned char)s types of local time starting at above
|
||||||
* tzh_typecnt repetitions of
|
* tzh_typecnt repetitions of
|
||||||
* one (char [4]) coded UT offset in seconds
|
* one (char [4]) coded UT offset in seconds
|
||||||
* one (unsigned char) used to set tm_isdst
|
* one (unsigned char) used to set tm_isdst
|
||||||
* one (unsigned char) that's an abbreviation list index
|
* one (unsigned char) that's an abbreviation list index
|
||||||
* tzh_charcnt (char)s '\0'-terminated zone abbreviations
|
* tzh_charcnt (char)s '\0'-terminated zone abbreviations
|
||||||
* tzh_leapcnt repetitions of
|
* tzh_leapcnt repetitions of
|
||||||
* one (char [4]) coded leap second transition times
|
* one (char [4]) coded leap second transition times
|
||||||
|
@ -17,15 +17,15 @@
|
|||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "tzfile.h"
|
#include "tzfile.h"
|
||||||
|
|
||||||
#define ZIC_VERSION_PRE_2013 '2'
|
#define ZIC_VERSION_PRE_2013 '2'
|
||||||
#define ZIC_VERSION '3'
|
#define ZIC_VERSION '3'
|
||||||
|
|
||||||
typedef int64 zic_t;
|
typedef int64 zic_t;
|
||||||
#define ZIC_MIN PG_INT64_MIN
|
#define ZIC_MIN PG_INT64_MIN
|
||||||
#define ZIC_MAX PG_INT64_MAX
|
#define ZIC_MAX PG_INT64_MAX
|
||||||
|
|
||||||
#ifndef ZIC_MAX_ABBR_LEN_WO_WARN
|
#ifndef ZIC_MAX_ABBR_LEN_WO_WARN
|
||||||
#define ZIC_MAX_ABBR_LEN_WO_WARN 6
|
#define ZIC_MAX_ABBR_LEN_WO_WARN 6
|
||||||
#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */
|
#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
@ -473,7 +473,7 @@ static void
|
|||||||
verror(const char *string, va_list args)
|
verror(const char *string, va_list args)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Match the format of "cc" to allow sh users to zic ... 2>&1 | error -t
|
* Match the format of "cc" to allow sh users to zic ... 2>&1 | error -t
|
||||||
* "*" -v on BSD systems.
|
* "*" -v on BSD systems.
|
||||||
*/
|
*/
|
||||||
if (filename)
|
if (filename)
|
||||||
@ -969,7 +969,7 @@ dolink(char const *fromfield, char const *tofield, bool staysymlink)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TIME_T_BITS_IN_FILE 64
|
#define TIME_T_BITS_IN_FILE 64
|
||||||
|
|
||||||
static zic_t const min_time = MINVAL(zic_t, TIME_T_BITS_IN_FILE);
|
static zic_t const min_time = MINVAL(zic_t, TIME_T_BITS_IN_FILE);
|
||||||
static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE);
|
static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE);
|
||||||
@ -984,7 +984,7 @@ static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE);
|
|||||||
* Ade PAR, Aghanim N, Armitage-Caplan C et al. Planck 2013 results.
|
* Ade PAR, Aghanim N, Armitage-Caplan C et al. Planck 2013 results.
|
||||||
* I. Overview of products and scientific results.
|
* I. Overview of products and scientific results.
|
||||||
* arXiv:1303.5062 2013-03-20 20:10:01 UTC
|
* arXiv:1303.5062 2013-03-20 20:10:01 UTC
|
||||||
* <http://arxiv.org/pdf/1303.5062v1> [PDF]
|
* <https://arxiv.org/pdf/1303.5062v1> [PDF]
|
||||||
*
|
*
|
||||||
* Page 36, Table 9, row Age/Gyr, column Planck+WP+highL+BAO 68% limits
|
* 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.
|
* gives the value 13.798 plus-or-minus 0.037 billion years.
|
||||||
@ -1208,7 +1208,9 @@ infile(const char *name)
|
|||||||
/* nothing to do */
|
/* nothing to do */
|
||||||
}
|
}
|
||||||
else if (wantcont)
|
else if (wantcont)
|
||||||
|
{
|
||||||
wantcont = inzcont(fields, nfields);
|
wantcont = inzcont(fields, nfields);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct lookup const *line_codes
|
struct lookup const *line_codes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user