From 90b4c62db7dd7156029cf9c3f67ad1dd8d6b51c6 Mon Sep 17 00:00:00 2001
From: michael <michael@content-space.de>
Date: Fri, 27 Feb 2009 23:33:44 +0100
Subject: [PATCH] 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
---
 inc/IXR_Library.php | 14 +++++++-------
 1 file 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);
     }
 }
 
-- 
GitLab