#47263 [Opn->Fbk]: xmlrpc_set_type() doesn't respect timezone settings
| From: | jani@php.net | Date: | Mon, 02 Feb 2009 21:29:39 +0000 |
| Subject: | #47263 [Opn->Fbk]: xmlrpc_set_type() doesn't respect timezone settings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133398@lists.php.net to get a copy of this message | ||
ID: 47263
Updated by: jani@php.net
Reported By: daniel dot oconnor at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: XMLRPC-EPI related
PHP Version: 5.2.8
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-02-01 16:12:37] daniel dot oconnor at gmail dot com
Description:
------------
xmlrpc_set_type() doesn't appear to respect my timezone settings
(alternatively, it should parse everything as GMT/UTC?)
Tested on 5.2.6 & 5.2.8
Reproduce code:
---------------
<?php
date_default_timezone_set('UTC');
$time = time();
$date = date("Y-m-dTH:i:s", $time) . "\n";
$date = "20060116T19:14:03";
$time = strtotime($date);
print $date . "\n";
print $time . "\n";
$xmlrpc_date = (string)$date;
xmlrpc_set_type($xmlrpc_date, 'datetime');
print $xmlrpc_date->timestamp . "\n";;
print date("Y-m-d H:i:s", $time) . "\n";
print date("Y-m-d H:i:s", $xmlrpc_date->timestamp);
/* 5.2.6 / ubuntu says:
20060116T19:14:03
1137438843
1137401043
2006-01-16 19:14:03
2006-01-16 08:44:03
*/
Expected result:
----------------
20060116T19:14:03
1137438843
1137438843
2006-01-16 19:14:03
2006-01-16 19:14:03
Actual result:
--------------
20060116T19:14:03
1137438843
1137401043
2006-01-16 19:14:03
2006-01-16 08:44:03
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47263&edit=1