diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-04 01:42:24 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-08-04 01:42:24 +0000 |
commit | fffafc5dca40ceca6912facca47c2e78e7e7c7e6 (patch) | |
tree | 0b77243593e82c826d3bd66117752c2518791074 /src | |
parent | 1032186f0c1080a1630b6c4321990b49d86b2b4a (diff) | |
download | postgresql-fffafc5dca40ceca6912facca47c2e78e7e7c7e6.tar.gz postgresql-fffafc5dca40ceca6912facca47c2e78e7e7c7e6.zip |
Suppress time zone name (%Z) when logging timestamps in xlog.c startup
on Windows. This is yet another manifestation of the problem that Windows
returns time zone names that may be in a different encoding than we are using.
I've put a better solution in HEAD, but the back branches need a simple patch.
Per report from Hiroshi Saito.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/transam/xlog.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 98c610dcadd..4ab57244b0b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.258 2006/11/30 18:29:11 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.258.2.1 2007/08/04 01:42:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -4221,7 +4221,12 @@ str_time(time_t tnow) static char buf[128]; strftime(buf, sizeof(buf), + /* Win32 timezone names are too long so don't print them */ +#ifndef WIN32 "%Y-%m-%d %H:%M:%S %Z", +#else + "%Y-%m-%d %H:%M:%S", +#endif localtime(&tnow)); return buf; |