diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-23 23:26:53 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-23 23:26:53 +0000 |
commit | 17edb8405633b8a290dd549aa3cbabbfe7ff0f96 (patch) | |
tree | c799da378c9c188b66cf173f99f62c8ab8cca2d8 | |
parent | 9e0fcc2ad55a36bd5fdeeb276ba8bb89d3170e97 (diff) | |
download | postgresql-17edb8405633b8a290dd549aa3cbabbfe7ff0f96.tar.gz postgresql-17edb8405633b8a290dd549aa3cbabbfe7ff0f96.zip |
Seems we had the wrong sign convention for the default Etc/GMTx zone
names. Per report from Alvaro.
-rw-r--r-- | src/timezone/pgtz.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c index bc3b0ef0eb6..6a2a84279a2 100644 --- a/src/timezone/pgtz.c +++ b/src/timezone/pgtz.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.12 2004/05/23 22:24:08 tgl Exp $ + * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.13 2004/05/23 23:26:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -219,9 +219,14 @@ identify_system_timezone(void) if (try_timezone(__tzbuf, &tt, dst_found)) return __tzbuf; - /* Did not find the timezone. Fallback to try a GMT zone. */ + /* + * Did not find the timezone. Fallback to try a GMT zone. Note that the + * zic timezone database names the GMT-offset zones in POSIX style: plus + * is west of Greenwich. It's unfortunate that this is opposite of SQL + * conventions. Should we therefore change the names? Probably not... + */ sprintf(__tzbuf, "Etc/GMT%s%d", - (-tt.std_ofs < 0) ? "+" : "", tt.std_ofs / 3600); + (-tt.std_ofs > 0) ? "+" : "", -tt.std_ofs / 3600); ereport(LOG, (errmsg("could not recognize system timezone, defaulting to \"%s\"", __tzbuf), |