ID: 47263 User updated by: daniel dot oconnor at gmail dot com Reported By: daniel dot oconnor at gmail dot com -Status: Feedback +Status: Open Bug Type: XMLRPC-EPI related PHP Version: 5.2.8 New Comment:
Windows: working happily now C:\>php -v PHP 5.2.9-dev (cli) (built: Feb 2 2009 11:39:58) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies C:\>php 147263.php 20060116T19:14:03 1137438843 1137438843 2006-01-16 19:14:03 2006-01-16 19:14:03 C:\> Previous Comments: ------------------------------------------------------------------------ [2009-02-02 21:29:38] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [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