Skip to content
Snippets Groups Projects
Commit 90b4c62d authored by michael's avatar michael
Browse files

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
parent a4da2756
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment