mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 22:01:16 +02:00
Fix for when POSIX time not defined.
This commit is contained in:
parent
1017ddd003
commit
06d88ecb17
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.35 1997/10/25 05:21:10 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.36 1997/10/30 14:06:47 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -154,6 +154,8 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
|
|||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_POSIX_TIME
|
||||||
|
|
||||||
tm->tm_year = tx->tm_year + 1900;
|
tm->tm_year = tx->tm_year + 1900;
|
||||||
tm->tm_mon = tx->tm_mon + 1;
|
tm->tm_mon = tx->tm_mon + 1;
|
||||||
tm->tm_mday = tx->tm_mday;
|
tm->tm_mday = tx->tm_mday;
|
||||||
@ -162,7 +164,6 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
|
|||||||
tm->tm_sec = tx->tm_sec;
|
tm->tm_sec = tx->tm_sec;
|
||||||
tm->tm_isdst = tx->tm_isdst;
|
tm->tm_isdst = tx->tm_isdst;
|
||||||
|
|
||||||
#ifdef USE_POSIX_TIME
|
|
||||||
#ifdef HAVE_INT_TIMEZONE
|
#ifdef HAVE_INT_TIMEZONE
|
||||||
if (tzp != NULL)
|
if (tzp != NULL)
|
||||||
*tzp = (tm->tm_isdst ? (timezone - 3600) : timezone);
|
*tzp = (tm->tm_isdst ? (timezone - 3600) : timezone);
|
||||||
|
Loading…
Reference in New Issue
Block a user