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