From c22d7cf8834a6a22eadc321bf9427f79a65c1c30 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 6 Feb 2004 08:01:35 +0000 Subject: PHP5 and WIN32 support was improved --- ext/soap/php_encoding.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ext/soap/php_encoding.c') diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 2978990c02..f4341eccb9 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1992,10 +1992,14 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma } /* Time zone support */ -#if HAVE_TM_GMTOFF +#ifdef HAVE_TM_GMTOFF sprintf(tzbuf, "%c%02d%02d", (ta->tm_gmtoff < 0) ? '-' : '+', abs(ta->tm_gmtoff / 3600), abs( (ta->tm_gmtoff % 3600) / 60 )); #else +# ifdef ZEND_WIN32 + sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? timezone - 3600:timezone)>0)?'-':'+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs(((ta->tm_isdst ? timezone - 3600 : timezone) % 3600) / 60)); +# else sprintf(tzbuf, "%c%02d%02d", ((ta->tm_isdst ? tzone - 3600:tzone)>0)?'-':'+', abs((ta->tm_isdst ? tzone - 3600 : tzone) / 3600), abs(((ta->tm_isdst ? tzone - 3600 : tzone) % 3600) / 60)); +# endif #endif if (strcmp(tzbuf,"+0000") == 0) { strcpy(tzbuf,"Z"); -- cgit v1.2.1