|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-02 21:29 UTC] jani@php.net
[2009-02-02 23:43 UTC] daniel dot oconnor at gmail dot com
[2009-02-03 19:02 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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