aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/datetime.c
diff options
context:
space:
mode:
authorTatsuo Ishii <ishii@postgresql.org>1999-04-26 04:42:49 +0000
committerTatsuo Ishii <ishii@postgresql.org>1999-04-26 04:42:49 +0000
commit89c7369d0e74a30b32db664e4c117ccdca78274c (patch)
tree62fa6bf579f292cd654acbdb6aa0d2417aaf28a5 /src/backend/utils/adt/datetime.c
parentc84ea433d725db190e6e2e51344ec055422414fe (diff)
downloadpostgresql-89c7369d0e74a30b32db664e4c117ccdca78274c.tar.gz
postgresql-89c7369d0e74a30b32db664e4c117ccdca78274c.zip
Fix from Yutaka Tanida <yutaka@marin.or.jp> for Cygwin32 support.
Diffstat (limited to 'src/backend/utils/adt/datetime.c')
-rw-r--r--src/backend/utils/adt/datetime.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index bdc4b589d28..aad1cec4eb0 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.31 1999/04/15 02:22:37 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.32 1999/04/26 04:42:48 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@@ -360,7 +360,11 @@ date2tm(DateADT dateVal, int *tzp, struct tm *tm, double *fsec, char **tzn)
if (tzn != NULL)
*tzn = (char *)tm->tm_zone;
#elif defined(HAVE_INT_TIMEZONE)
+#ifdef __CYGWIN__
+ *tzp = (tm->tm_isdst ? (_timezone - 3600) : _timezone);
+#else
*tzp = (tm->tm_isdst ? (timezone - 3600) : timezone);
+#endif
if (tzn != NULL)
*tzn = tzname[(tm->tm_isdst > 0)];
#else