Commit f3094920 authored by Tom Lane's avatar Tom Lane

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

This is mostly to absorb some corner-case fixes in zic for year-2037
timestamps.  The other changes that have been made are unlikely to affect
our usage, but nonetheless we may as well take 'em.
parent a3215431
...@@ -1280,9 +1280,8 @@ gmtsub(pg_time_t const * timep, int32 offset, struct pg_tm * tmp) ...@@ -1280,9 +1280,8 @@ gmtsub(pg_time_t const * timep, int32 offset, struct pg_tm * tmp)
result = timesub(timep, offset, gmtptr, tmp); result = timesub(timep, offset, gmtptr, tmp);
/* /*
* Could get fancy here and deliver something such as "UT+xxxx" or * Could get fancy here and deliver something such as "+xx" or "-xx" if
* "UT-xxxx" if offset is non-zero, but this is no time for a treasure * offset is non-zero, but this is no time for a treasure hunt.
* hunt.
*/ */
if (offset != 0) if (offset != 0)
tmp->tm_zone = wildabbr; tmp->tm_zone = wildabbr;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "pgtime.h" #include "pgtime.h"
/* This string was in the Factory zone through version 2016f. */
#define GRANDPARENTED "Local time zone must be set--see zic manual page" #define GRANDPARENTED "Local time zone must be set--see zic manual page"
/* /*
......
...@@ -128,7 +128,7 @@ pg_strftime(char *s, size_t maxsize, const char *format, ...@@ -128,7 +128,7 @@ pg_strftime(char *s, size_t maxsize, const char *format,
int warn; int warn;
warn = IN_NONE; warn = IN_NONE;
p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn); p = _fmt(format, t, s, s + maxsize, &warn);
if (p == s + maxsize) if (p == s + maxsize)
return 0; return 0;
*p = '\0'; *p = '\0';
......
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