summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-08-04 01:42:44 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-08-04 01:42:44 +0000
commit2e24f4af49ddf6ed4d05446c132b1e33415a26b2 (patch)
tree65289c5fc85491cb6d2063f9c2fb164feb4ea8f5 /src/backend/access/transam/xlog.c
parentdb97262ba550c4ef379b4c316e38cd14d79175db (diff)
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/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 28016c35a1e..92e0448beaf 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.180.4.4 2006/01/05 00:55:06 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.180.4.5 2007/08/04 01:42:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -3625,7 +3625,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;