#47263 [NEW]: xmlrpc_set_type() doesn't respect timezone settings
| From: | daniel dot oconnor at gmail dot com | Date: | Sun, 01 Feb 2009 16:12:38 +0000 |
| Subject: | #47263 [NEW]: xmlrpc_set_type() doesn't respect timezone settings | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-133345@lists.php.net to get a copy of this message | ||
From: daniel dot oconnor at gmail dot com
Operating system:
PHP version: 5.2.8
PHP Bug Type: XMLRPC-EPI related
Bug description: xmlrpc_set_type() doesn't respect timezone settings
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 bug report at http://bugs.php.net/?id=47263&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47263&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47263&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47263&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47263&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47263&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47263&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47263&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47263&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47263&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47263&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47263&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47263&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47263&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47263&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47263&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47263&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47263&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47263&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47263&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47263&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47263&r=mysqlcfg