From: Tom Lane Date: Sat, 4 Aug 2007 01:42:24 +0000 (+0000) Subject: Suppress time zone name (%Z) when logging timestamps in xlog.c startup X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=a5bb7f424a6c5f34811ce9f6b75597bca986f2c1;p=users%2Fbernd%2Fpostgres.git 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. --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index cd94e1f932..b58e3be337 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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;