#19446 [Ver->Ctl]: Incorrect Offset Reported

From: Date: Wed, 18 Sep 2002 17:27:46 +0000
Subject: #19446 [Ver->Ctl]: Incorrect Offset Reported
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19659@lists.php.net to get a copy of this message
ID: 19446 Updated by: derick@php.net Reported By: eangulus@hotmail.com -Status: Verified +Status: Critical Bug Type: Date/time related Operating System: Linux PHP Version: 4.2.1 New Comment: <?php putenv('TZ=Canada/Newfoundland'); print date('h:i:sa d/m/Y O T') ."<br />\n"; putenv('TZ=Canada/Eastern'); print date('h:i:sa d/m/Y O T') ."<br />\n"; ?> [Wed Sep 18 14:47:59 2002] Script: '-' --------------------------------------- /dat/dev/php/php-4.3.0dev/Zend/zend_execute_API.c(282) : Block 0x0832FD00 status: /dat/dev/php/php-4.3.0dev/Zend/zend_variables.c(44) : Actual location (location was relayed) Beginning: OK (allocated on /dat/dev/php/php-4.3.0dev/ext/standard/datetime.c:377, 32 bytes) End: Overflown (magic=0x2A8F0054 instead of 0x2A8FCC84) 2 byte(s) overflown --------------------------------------- 02:47:59pm 18/09/2002 -021800 NDT<br /> 01:17:59pm 18/09/2002 -0400 EDT<br /> /dat/dev/php/php-4.3.0dev/ext/standard/datetime.c(377) : Freeing 0x0832FD24 (32 bytes), script=- Previous Comments: ------------------------------------------------------------------------ [2002-09-18 10:31:24] sean@php.net Confirmed. Also happens to newfoundland. Seems to be all fractional offsets as stated: <?php putenv('TZ=Canada/Newfoundland'); print date('h:i:sa d/m/Y O T') ."<br />\n"; putenv('TZ=Canada/Eastern'); print date('h:i:sa d/m/Y O T') ."<br />\n"; ?> output: 12:55:52pm 18/09/2002 -021800 NDT 11:25:52am 18/09/2002 -0400 EDT NOTE: Time is correct. Offset is incorrect. S ------------------------------------------------------------------------ [2002-09-16 21:30:51] eangulus@hotmail.com Also occurs on other timezones that are not complete hours. EG: The Zones, Asia/Riyadh87, Asia/Riyadh88, Asia/Riyadh89 are the same and suppose to be +0345. But I get +03424. Also the Abreviation is reported as ?? I expected this to actually be either an actual abreviation. ------------------------------------------------------------------------ [2002-09-16 21:00:53] eangulus@hotmail.com I used this code to change timezones: <?php putenv('TZ=Asia/Calcutta'); print date('h:i:sa d/m/Y O T'); ?> Asia/Calcutta has an offset of +0530 GMT or 5.5 hours ahead of GMT. It reported the O date value as +051800 I expected it to be +0530 or +053000 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19446&edit=1

« previous php.bugs (#19659) next »