From 63bd0db12199c5df043e1dea0f2b574f622b3a4c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 21 May 2004 05:08:06 +0000 Subject: Integrate src/timezone library for all platforms. There is more we can and should do now that we control our own destiny for timezone handling, but this commit gets the bulk of the picayune diffs in place. Magnus Hagander and Tom Lane. --- src/backend/utils/error/elog.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/backend/utils/error/elog.c') diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 012842b61d9..d7e5a983763 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -37,18 +37,16 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.136 2004/05/07 00:24:58 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.137 2004/05/21 05:08:02 tgl Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" -#include #include #include #include #include -#include #include #ifdef HAVE_SYSLOG #include @@ -58,6 +56,7 @@ #include "libpq/pqformat.h" #include "mb/pg_wchar.h" #include "miscadmin.h" +#include "pgtime.h" #include "storage/ipc.h" #include "tcop/tcopprot.h" #include "utils/memutils.h" @@ -1217,8 +1216,8 @@ log_line_prefix(StringInfo buf) time_t stamp_time = time(NULL); char strfbuf[128]; - strftime(strfbuf, sizeof(strfbuf), "%Y-%m-%d %H:%M:%S %Z", - localtime(&stamp_time)); + pg_strftime(strfbuf, sizeof(strfbuf), "%Y-%m-%d %H:%M:%S %Z", + pg_localtime(&stamp_time)); appendStringInfoString(buf, strfbuf); } break; @@ -1228,8 +1227,8 @@ log_line_prefix(StringInfo buf) time_t stamp_time = MyProcPort->session_start.tv_sec; char strfbuf[128]; - strftime(strfbuf, sizeof(strfbuf), "%Y-%m-%d %H:%M:%S %Z", - localtime(&stamp_time)); + pg_strftime(strfbuf, sizeof(strfbuf), "%Y-%m-%d %H:%M:%S %Z", + pg_localtime(&stamp_time)); appendStringInfoString(buf, strfbuf); } break; -- cgit v1.2.3