diff options
Diffstat (limited to 'src/backend/utils/adt/nabstime.c')
-rw-r--r-- | src/backend/utils/adt/nabstime.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 8e3b1463ee8..11f70819420 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -4,7 +4,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: nabstime.c,v 1.53 1999/02/21 03:49:32 scrappy Exp $ + * $Id: nabstime.c,v 1.54 1999/04/26 04:42:49 ishii Exp $ * */ #include <stdio.h> @@ -77,7 +77,12 @@ GetCurrentAbsoluteTime(void) tm = localtime(&now); CDayLight = tm->tm_isdst; - CTimeZone = (tm->tm_isdst ? (timezone - 3600) : timezone); + CTimeZone = +#ifdef __CYGWIN32__ + (tm->tm_isdst ? (_timezone - 3600) : _timezone); +#else + (tm->tm_isdst ? (timezone - 3600) : timezone); +#endif strcpy(CTZName, tzname[tm->tm_isdst]); #else #error USE_POSIX_TIME defined but no time zone available @@ -167,7 +172,11 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn) strcpy(tzn, tm->tm_zone); #elif defined(HAVE_INT_TIMEZONE) if (tzp != NULL) +#ifdef __CYGWIN__ + *tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone); +#else *tzp = (tm->tm_isdst ? (timezone - 3600) : timezone); +#endif if (tzn != NULL) strcpy(tzn, tzname[tm->tm_isdst]); #else |