]> granicus.if.org Git - php/commitdiff
cygwin fix
authorStanislav Malyshev <stas@php.net>
Mon, 4 Mar 2002 11:11:25 +0000 (11:11 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 4 Mar 2002 11:11:25 +0000 (11:11 +0000)
ext/standard/datetime.c

index 63d3bafe2d196ed9ad378eca3b2d60aafc14a1d6..d7fc392dcdfb11d459168beed5a70ef99b3654cd 100644 (file)
@@ -184,7 +184,11 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
            ** If correcting for daylight savings time, we set the adjustment to
                ** the value of timezone - 3600 seconds.
            */
+#ifdef __CYGWIN__
+           gmadjust = -(is_dst ? _timezone - 3600 : _timezone);
+#else
            gmadjust = -(is_dst ? timezone - 3600 : timezone);
+#endif
 #endif
                seconds += gmadjust;
        }
@@ -251,7 +255,11 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
        } else {
                ta = php_localtime_r(&the_time, &tmbuf);
 #if !HAVE_TM_GMTOFF
+#ifdef __CYGWIN__
+               tzone = _timezone;
+#else
                tzone = timezone;
+#endif
                tname[0] = tzname[0];
 #endif
        }