From: Marc G. Fournier Date: Fri, 21 Mar 1997 18:53:28 +0000 (+0000) Subject: From: "D'Arcy J.M. Cain" X-Git-Tag: REL6_1~445 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3589f71ebb2da4d03faccca5a04ada6c9889af85;p=postgresql From: "D'Arcy J.M. Cain" Subject: [HACKERS] backend/utils/adt/nabstime.c There is a problem with some of the calls to strftime. The second arg is missing. In all cases the buffer is CTZName which, according to the file init/globals.c, is char CTZName[8] so I have added this value. I know there should be a #define set up for this but I wasn't sure which header to put it in. --- diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 58f4109e8c..11811c9117 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.15 1997/03/18 16:35:20 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.16 1997/03/21 18:53:28 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -62,13 +62,13 @@ GetCurrentAbsoluteTime(void) CTimeZone = - tmnow->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */ CDayLight = (tmnow->tm_isdst > 0); /* XXX is there a better way to get local timezone string in V7? - tgl 97/03/18 */ - strftime( CTZName, "%Z", localtime(&now)); + strftime( CTZName, 8, "%Z", localtime(&now)); #endif #else /* ! USE_POSIX_TIME */ CTimeZone = tbnow.timezone * 60; CDayLight = (tbnow.dstflag != 0); /* XXX does this work to get the local timezone string in V7? - tgl 97/03/18 */ - strftime( CTZName, "%Z", localtime(&now)); + strftime( CTZName, 8, "%Z", localtime(&now)); #endif };