summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/xmlrpc.inc14
-rw-r--r--modules/simpletest/tests/xmlrpc_test.module2
2 files changed, 8 insertions, 8 deletions
diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
index 4895e9802..25e043da4 100644
--- a/includes/xmlrpc.inc
+++ b/includes/xmlrpc.inc
@@ -381,13 +381,13 @@ function xmlrpc_date($time) {
$xmlrpc_date->is_date = TRUE;
// $time can be a PHP timestamp or an ISO one
if (is_numeric($time)) {
- $xmlrpc_date->year = date('Y', $time);
- $xmlrpc_date->month = date('m', $time);
- $xmlrpc_date->day = date('d', $time);
- $xmlrpc_date->hour = date('H', $time);
- $xmlrpc_date->minute = date('i', $time);
- $xmlrpc_date->second = date('s', $time);
- $xmlrpc_date->iso8601 = date('Ymd\TH:i:s', $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;
diff --git a/modules/simpletest/tests/xmlrpc_test.module b/modules/simpletest/tests/xmlrpc_test.module
index 132171742..fba5a0430 100644
--- a/modules/simpletest/tests/xmlrpc_test.module
+++ b/modules/simpletest/tests/xmlrpc_test.module
@@ -30,7 +30,7 @@ function xmlrpc_test_echoStructTest($array) {
}
function xmlrpc_test_manyTypesTest($number, $boolean, $string, $double, $dateTime, $base64) {
- $timestamp = mktime($dateTime->hour, $dateTime->minute, $dateTime->second, $dateTime->month, $dateTime->day, $dateTime->year);
+ $timestamp = gmmktime($dateTime->hour, $dateTime->minute, $dateTime->second, $dateTime->month, $dateTime->day, $dateTime->year);
return array($number, $boolean, $string, $double, xmlrpc_date($timestamp), xmlrpc_Base64($base64));
}