summaryrefslogtreecommitdiff
path: root/inc/IXR_Library.php
diff options
context:
space:
mode:
authormichael <michael@content-space.de>2009-02-27 23:33:44 +0100
committermichael <michael@content-space.de>2009-02-27 23:33:44 +0100
commit90b4c62db7dd7156029cf9c3f67ad1dd8d6b51c6 (patch)
tree939cc1d5dd952defed21aed9cfbc3dfde0ada411 /inc/IXR_Library.php
parenta4da2756bc8d44d65d6e5f6b4399498a0bc5c59d (diff)
downloadrpg-90b4c62db7dd7156029cf9c3f67ad1dd8d6b51c6.tar.gz
rpg-90b4c62db7dd7156029cf9c3f67ad1dd8d6b51c6.tar.bz2
Replaced date-functions by their utc-quivalent in the XML-RPC library.
Ignore-this: e74f051d409c2df9e59f6f0b42f362f8 According to the specification of the wiki XML-RPC api at http://www.jspwiki.org/wiki/WikiRPCInterface2 all returned datetimes should be UTC. This commit changes the date-functions in IXR_Date to make DokuWiki obey to this specification (otherwise there is now way to get from these datetimes back to a timestamp for example). darcs-hash:20090227223344-074e0-91382e67b18e6e1fa3b6d9311adbc1898fb73a01.gz
Diffstat (limited to 'inc/IXR_Library.php')
-rw-r--r--inc/IXR_Library.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php
index 50792103c..2b907519a 100644
--- a/inc/IXR_Library.php
+++ b/inc/IXR_Library.php
@@ -600,12 +600,12 @@ class IXR_Date {
}
}
function parseTimestamp($timestamp) {
- $this->year = date('Y', $timestamp);
- $this->month = date('m', $timestamp);
- $this->day = date('d', $timestamp);
- $this->hour = date('H', $timestamp);
- $this->minute = date('i', $timestamp);
- $this->second = date('s', $timestamp);
+ $this->year = gmdate('Y', $timestamp);
+ $this->month = gmdate('m', $timestamp);
+ $this->day = gmdate('d', $timestamp);
+ $this->hour = gmdate('H', $timestamp);
+ $this->minute = gmdate('i', $timestamp);
+ $this->second = gmdate('s', $timestamp);
}
function parseIso($iso) {
$this->year = substr($iso, 0, 4);
@@ -622,7 +622,7 @@ class IXR_Date {
return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';
}
function getTimestamp() {
- return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
+ return gmmktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
}
}