From: Ilia Alshanetsky Date: Mon, 19 Aug 2002 21:59:46 +0000 (+0000) Subject: Convert the value of tz_minuteswest inside struct timezone on Windows to X-Git-Tag: RELEASE_0_91~384 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6dbc0e5483d4c1c4008a390cb613d9118dd73e71;p=php Convert the value of tz_minuteswest inside struct timezone on Windows to minutes from seconds. --- diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 5d6da7c2fa..17a4a98328 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -43,6 +43,7 @@ #define NUL '\0' #define MICRO_IN_SEC 1000000.00 +#define SEC_IN_MIN 60 /* {{{ proto string microtime(void) Returns a string containing the current time in seconds and microseconds */ @@ -81,7 +82,11 @@ PHP_FUNCTION(gettimeofday) array_init(return_value); add_assoc_long(return_value, "sec", tp.tv_sec); add_assoc_long(return_value, "usec", tp.tv_usec); +#ifdef PHP_WIN32 + add_assoc_long(return_value, "minuteswest", tz.tz_minuteswest/SEC_IN_MIN); +#else add_assoc_long(return_value, "minuteswest", tz.tz_minuteswest); +#endif add_assoc_long(return_value, "dsttime", tz.tz_dsttime); return; } else