#35143 [Opn->Asn]: gettimeofday()'s ignoring current time zone

From: Date: Mon, 07 Nov 2005 20:39:00 +0000
Subject: #35143 [Opn->Asn]: gettimeofday()'s ignoring current time zone
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87799@lists.php.net to get a copy of this message
ID: 35143 Updated by: sniper@php.net Reported By: tomas_matousek at hotmail dot com -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: WinXP PHP Version: 5.1.0RC4 -Assigned To: +Assigned To: derick New Comment: Assigned to the master of timezones. Previous Comments: ------------------------------------------------------------------------ [2005-11-07 20:38:19] tomas_matousek at hotmail dot com Description: ------------ I assume gettimeofday() should return "minuteswest" and "dsttime" according to the current time zone set by date_default_timezone_set, right? It doesn't work. It returns the system time zone instead. Reproduce code: --------------- date_default_timezone_set("UTC"); var_dump(date_default_timezone_get()); var_dump(gettimeofday()); Expected result: ---------------- string(3) "UTC" array(4) { ["sec"]=> int(1131392140) ["usec"]=> int(31336) ["minuteswest"]=> int(0) ["dsttime"]=> int(0) } Actual result: -------------- string(3) "UTC" array(4) { ["sec"]=> int(1131392140) ["usec"]=> int(31336) ["minuteswest"]=> int(-60) ["dsttime"]=> int(1) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35143&edit=1

« previous php.bugs (#87799) next »