diff options
Diffstat (limited to 'src/backend/access/transam')
-rw-r--r-- | src/backend/access/transam/xact.c | 7 | ||||
-rw-r--r-- | src/backend/access/transam/xlog.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 1764000e5e5..2ae0fc5b21d 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.167 2004/05/22 23:14:37 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.168 2004/06/03 02:08:00 tgl Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -141,6 +141,7 @@ #include "postgres.h" +#include <time.h> #include <unistd.h> #include "access/gistscan.h" @@ -1858,7 +1859,7 @@ xact_desc(char *buf, uint8 xl_info, char *rec) if (info == XLOG_XACT_COMMIT) { xl_xact_commit *xlrec = (xl_xact_commit *) rec; - struct pg_tm *tm = pg_localtime(&xlrec->xtime); + struct tm *tm = localtime(&xlrec->xtime); sprintf(buf + strlen(buf), "commit: %04u-%02u-%02u %02u:%02u:%02u", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, @@ -1868,7 +1869,7 @@ xact_desc(char *buf, uint8 xl_info, char *rec) else if (info == XLOG_XACT_ABORT) { xl_xact_abort *xlrec = (xl_xact_abort *) rec; - struct pg_tm *tm = pg_localtime(&xlrec->xtime); + struct tm *tm = localtime(&xlrec->xtime); sprintf(buf + strlen(buf), "abort: %04u-%02u-%02u %02u:%02u:%02u", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index cfb864d0941..f1205640615 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.145 2004/05/29 22:48:18 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.146 2004/06/03 02:08:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -16,6 +16,7 @@ #include <fcntl.h> #include <signal.h> +#include <time.h> #include <unistd.h> #include <sys/stat.h> #include <sys/time.h> @@ -2761,9 +2762,9 @@ str_time(time_t tnow) { static char buf[128]; - pg_strftime(buf, sizeof(buf), + strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", - pg_localtime(&tnow)); + localtime(&tnow)); return buf; } |