Suppress time zone name (%Z) when logging timestamps in xlog.c startup
authorTom Lane <[email protected]>
Sat, 4 Aug 2007 01:42:24 +0000 (01:42 +0000)
committerTom Lane <[email protected]>
Sat, 4 Aug 2007 01:42:24 +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 cd94e1f93287ef76977d1fff9d39dc4654fe4705..b58e3be337fdbb916849c789fe0f64098d64e6fa 100644 (file)
@@ -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;