diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 1999-04-26 04:42:49 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 1999-04-26 04:42:49 +0000 |
commit | 89c7369d0e74a30b32db664e4c117ccdca78274c (patch) | |
tree | 62fa6bf579f292cd654acbdb6aa0d2417aaf28a5 /src/backend/utils/adt/nabstime.c | |
parent | c84ea433d725db190e6e2e51344ec055422414fe (diff) | |
download | postgresql-89c7369d0e74a30b32db664e4c117ccdca78274c.tar.gz postgresql-89c7369d0e74a30b32db664e4c117ccdca78274c.zip |
Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support.
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 |