From 3d22fe43571af02872e4aad6d4dd7e3d82a00af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Tue, 11 Dec 2007 12:32:33 +0000 Subject: #199084 by chx: better conformance with ISO date formats in our xmlrpc code --- includes/xmlrpc.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc index 2bf8b1817..ebd19c461 100644 --- a/includes/xmlrpc.inc +++ b/includes/xmlrpc.inc @@ -390,12 +390,13 @@ function xmlrpc_date($time) { $xmlrpc_date->iso8601 = date('Ymd\TH:i:s'); } else { + $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, 12, 2); - $xmlrpc_date->second = substr($time, 15, 2); + $xmlrpc_date->minute = substr($time, 11, 2); + $xmlrpc_date->second = substr($time, 14, 2); $xmlrpc_date->iso8601 = $time; } return $xmlrpc_date; -- cgit v1.2.3