From: "D'Arcy J.M. Cain" <darcy@druid.net>
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.
This commit is contained in:
parent
69c2c66196
commit
3589f71ebb
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue