Mercurial > defr > drupal > core
comparison includes/xmlrpc.inc @ 13:8b6c45761e01 6.6
Drupal 6.6
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:32:33 +0100 |
parents | 589fb7c02327 |
children | 3edae6ecd6c6 |
comparison
equal
deleted
inserted
replaced
12:4ca9f57cc4d4 | 13:8b6c45761e01 |
---|---|
1 <?php | 1 <?php |
2 // $Id: xmlrpc.inc,v 1.47.2.3 2008/09/17 06:28:54 goba Exp $ | 2 // $Id: xmlrpc.inc,v 1.47.2.4 2008/10/15 14:04:06 dries Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @file | 5 * @file |
6 * Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005 | 6 * Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005 |
7 * Version 1.7 (beta) - Simon Willison, 23rd May 2005 | 7 * Version 1.7 (beta) - Simon Willison, 23rd May 2005 |
382 function xmlrpc_date($time) { | 382 function xmlrpc_date($time) { |
383 $xmlrpc_date = new stdClass(); | 383 $xmlrpc_date = new stdClass(); |
384 $xmlrpc_date->is_date = TRUE; | 384 $xmlrpc_date->is_date = TRUE; |
385 // $time can be a PHP timestamp or an ISO one | 385 // $time can be a PHP timestamp or an ISO one |
386 if (is_numeric($time)) { | 386 if (is_numeric($time)) { |
387 $xmlrpc_date->year = date('Y', $time); | 387 $xmlrpc_date->year = gmdate('Y', $time); |
388 $xmlrpc_date->month = date('m', $time); | 388 $xmlrpc_date->month = gmdate('m', $time); |
389 $xmlrpc_date->day = date('d', $time); | 389 $xmlrpc_date->day = gmdate('d', $time); |
390 $xmlrpc_date->hour = date('H', $time); | 390 $xmlrpc_date->hour = gmdate('H', $time); |
391 $xmlrpc_date->minute = date('i', $time); | 391 $xmlrpc_date->minute = gmdate('i', $time); |
392 $xmlrpc_date->second = date('s', $time); | 392 $xmlrpc_date->second = gmdate('s', $time); |
393 $xmlrpc_date->iso8601 = date('Ymd\TH:i:s', $time); | 393 $xmlrpc_date->iso8601 = gmdate('Ymd\TH:i:s', $time); |
394 } | 394 } |
395 else { | 395 else { |
396 $xmlrpc_date->iso8601 = $time; | 396 $xmlrpc_date->iso8601 = $time; |
397 $time = str_replace(array('-', ':'), '', $time); | 397 $time = str_replace(array('-', ':'), '', $time); |
398 $xmlrpc_date->year = substr($time, 0, 4); | 398 $xmlrpc_date->year = substr($time, 0, 4); |