Commit b45f6613 authored by Tom Lane's avatar Tom Lane

Sync our copy of the timezone library with IANA release tzcode2018e.

The non-cosmetic changes involve teaching the "zic" tzdata compiler about
negative DST.  While I'm not currently intending that we start using
negative-DST data right away, it seems possible that somebody would try
to use our copy of zic with bleeding-edge IANA data.  So we'd better be
out in front of this change code-wise, even though it doesn't matter for
the data file we're shipping.

Discussion: https://postgr.es/m/30996.1525445902@sss.pgh.pa.us
parent 59cb3230
...@@ -55,7 +55,7 @@ match properly on the old version. ...@@ -55,7 +55,7 @@ match properly on the old version.
Time Zone code Time Zone code
============== ==============
The code in this directory is currently synced with tzcode release 2017c. The code in this directory is currently synced with tzcode release 2018e.
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.
......
...@@ -60,9 +60,8 @@ static int tzdefrules_loaded = 0; ...@@ -60,9 +60,8 @@ static int tzdefrules_loaded = 0;
/* /*
* The DST rules to use if TZ has no rules and we can't load TZDEFRULES. * The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
* Default to US rules as of 2017-05-07. * Default to US rules as of 2017-05-07.
* POSIX 1003.1 section 8.1.1 says that the default DST rules are * POSIX does not specify the default DST rules;
* implementation dependent; for historical reasons, US rules are a * for historical reasons, US rules are a common default.
* common default.
*/ */
#define TZDEFRULESTRING ",M3.2.0,M11.1.0" #define TZDEFRULESTRING ",M3.2.0,M11.1.0"
...@@ -1158,10 +1157,11 @@ tzparse(const char *name, struct state *sp, bool lastditch) ...@@ -1158,10 +1157,11 @@ tzparse(const char *name, struct state *sp, bool lastditch)
else else
{ {
/* /*
* If summer time is in effect, and the transition time * If daylight saving time is in effect, and the
* was not specified as standard time, add the summer time * transition time was not specified as standard time, add
* offset to the transition time; otherwise, add the * the daylight saving time offset to the transition time;
* standard time offset to the transition time. * otherwise, add the standard time offset to the
* transition time.
*/ */
/* /*
......
...@@ -203,7 +203,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt, ...@@ -203,7 +203,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
/* /*
* Locale modifiers of C99 and later. The sequences %Ec * Locale modifiers of C99 and later. The sequences %Ec
* %EC %Ex %EX %Ey %EY %Od %oe %OH %OI %Om %OM %OS %Ou %OU * %EC %Ex %EX %Ey %EY %Od %oe %OH %OI %Om %OM %OS %Ou %OU
* %OV %Ow %OW %Oy are supposed to provide alternate * %OV %Ow %OW %Oy are supposed to provide alternative
* representations. * representations.
*/ */
goto label; goto label;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment