diff options
Diffstat (limited to 'src/bin/pg_dump/pg_dumpall.c')
-rw-r--r-- | src/bin/pg_dump/pg_dumpall.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 405009158d5..b2b3e6feb74 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -2039,22 +2039,10 @@ executeCommand(PGconn *conn, const char *query) static void dumpTimestamp(char *msg) { - char buf[256]; + char buf[64]; time_t now = time(NULL); - /* - * We don't print the timezone on Win32, because the names are long and - * localized, which means they may contain characters in various random - * encodings; this has been seen to cause encoding errors when reading the - * dump script. - */ - if (strftime(buf, sizeof(buf), -#ifndef WIN32 - "%Y-%m-%d %H:%M:%S %Z", -#else - "%Y-%m-%d %H:%M:%S", -#endif - localtime(&now)) != 0) + if (strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %z", localtime(&now)) != 0) fprintf(OPF, "-- %s %s\n\n", msg, buf); } |