Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b45f661

Browse files
committed
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
1 parent 59cb323 commit b45f661

File tree

4 files changed

+129
-46
lines changed

4 files changed

+129
-46
lines changed

src/timezone/README

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ match properly on the old version.
5555
Time Zone code
5656
==============
5757

58-
The code in this directory is currently synced with tzcode release 2017c.
58+
The code in this directory is currently synced with tzcode release 2018e.
5959
There are many cosmetic (and not so cosmetic) differences from the
6060
original tzcode library, but diffs in the upstream version should usually
6161
be propagated to our version. Here are some notes about that.

src/timezone/localtime.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ static int tzdefrules_loaded = 0;
6060
/*
6161
* The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
6262
* Default to US rules as of 2017-05-07.
63-
* POSIX 1003.1 section 8.1.1 says that the default DST rules are
64-
* implementation dependent; for historical reasons, US rules are a
65-
* common default.
63+
* POSIX does not specify the default DST rules;
64+
* for historical reasons, US rules are a common default.
6665
*/
6766
#define TZDEFRULESTRING ",M3.2.0,M11.1.0"
6867

@@ -1158,10 +1157,11 @@ tzparse(const char *name, struct state *sp, bool lastditch)
11581157
else
11591158
{
11601159
/*
1161-
* If summer time is in effect, and the transition time
1162-
* was not specified as standard time, add the summer time
1163-
* offset to the transition time; otherwise, add the
1164-
* standard time offset to the transition time.
1160+
* If daylight saving time is in effect, and the
1161+
* transition time was not specified as standard time, add
1162+
* the daylight saving time offset to the transition time;
1163+
* otherwise, add the standard time offset to the
1164+
* transition time.
11651165
*/
11661166

11671167
/*

src/timezone/strftime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ _fmt(const char *format, const struct pg_tm *t, char *pt,
203203
/*
204204
* Locale modifiers of C99 and later. The sequences %Ec
205205
* %EC %Ex %EX %Ey %EY %Od %oe %OH %OI %Om %OM %OS %Ou %OU
206-
* %OV %Ow %OW %Oy are supposed to provide alternate
206+
* %OV %Ow %OW %Oy are supposed to provide alternative
207207
* representations.
208208
*/
209209
goto label;

0 commit comments

Comments
 (0)