Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17edb84

Browse files
committed
Seems we had the wrong sign convention for the default Etc/GMTx zone
names. Per report from Alvaro.
1 parent9e0fcc2 commit17edb84

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎src/timezone/pgtz.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.12 2004/05/2322:24:08 tgl Exp $
9+
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.13 2004/05/2323:26:53 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -219,9 +219,14 @@ identify_system_timezone(void)
219219
if (try_timezone(__tzbuf,&tt,dst_found))
220220
return__tzbuf;
221221

222-
/* Did not find the timezone. Fallback to try a GMT zone. */
222+
/*
223+
* Did not find the timezone. Fallback to try a GMT zone. Note that the
224+
* zic timezone database names the GMT-offset zones in POSIX style: plus
225+
* is west of Greenwich. It's unfortunate that this is opposite of SQL
226+
* conventions. Should we therefore change the names? Probably not...
227+
*/
223228
sprintf(__tzbuf,"Etc/GMT%s%d",
224-
(-tt.std_ofs<0) ?"+" :"",tt.std_ofs /3600);
229+
(-tt.std_ofs>0) ?"+" :"",-tt.std_ofs /3600);
225230
ereport(LOG,
226231
(errmsg("could not recognize system timezone, defaulting to \"%s\"",
227232
__tzbuf),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp