]> granicus.if.org Git - postgresql/commitdiff
Suppress time zone name (%Z) when logging timestamps in xlog.c startup
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Aug 2007 01:42:34 +0000 (01:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Aug 2007 01:42:34 +0000 (01:42 +0000)
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.

src/backend/access/transam/xlog.c

index e7e55ce4d563c96d46d5b673006f2a4e6a77a027..466c3f5dd181fa3142969125137ee68fe992d9ab 100644 (file)
@@ -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.222.2.4 2006/06/22 20:43:20 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.222.2.5 2007/08/04 01:42:34 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -3908,7 +3908,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;