function xmlrpc_date
Same name and namespace in other branches
- 7.x drupal-7.x/includes/xmlrpc.inc \xmlrpc_date()
2 calls to xmlrpc_date()
- xmlrpc_message_tag_close in drupal-6.x/includes/xmlrpc.inc
- _blogapi_get_post in drupal-6.x/modules/blogapi/blogapi.module
Archivo
- drupal-6.x/includes/xmlrpc.inc, line 378
- Drupal XML-RPC library. Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
Version 1.7 (beta) - Simon Willison, 23rd May 2005
Site: http://scripts.incutio.com/xmlrpc/
Manual: http://scripts.incutio.com/xmlrpc/manual.php
This…
Código
function xmlrpc_date($time) {
$xmlrpc_date = new stdClass();
$xmlrpc_date->is_date = TRUE;
if (is_numeric($time)) {
$xmlrpc_date->year = gmdate('Y', $time);
$xmlrpc_date->month = gmdate('m', $time);
$xmlrpc_date->day = gmdate('d', $time);
$xmlrpc_date->hour = gmdate('H', $time);
$xmlrpc_date->minute = gmdate('i', $time);
$xmlrpc_date->second = gmdate('s', $time);
$xmlrpc_date->iso8601 = gmdate('Ymd\TH:i:s', $time);
}
else {
$xmlrpc_date->iso8601 = $time;
$time = str_replace(array('-', ':'), '', $time);
$xmlrpc_date->year = substr($time, 0, 4);
$xmlrpc_date->month = substr($time, 4, 2);
$xmlrpc_date->day = substr($time, 6, 2);
$xmlrpc_date->hour = substr($time, 9, 2);
$xmlrpc_date->minute = substr($time, 11, 2);
$xmlrpc_date->second = substr($time, 13, 2);
}
return $xmlrpc_date;
}