Skip to content

Commit

Permalink
XMLRPC: fix for IXR_Date which returned a wrong formatted UTC timestamp
Browse files Browse the repository at this point in the history
darcs-hash:20080305193802-23886-b786952c122c36e63676dd82d771494d763b9569.gz
  • Loading branch information
Michael Klier committed Mar 5, 2008
1 parent 5159781 commit 5cc966c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/IXR_Library.php
Expand Up @@ -585,8 +585,8 @@ function IXR_Date($time) {
}
function parseTimestamp($timestamp) {
$this->year = date('Y', $timestamp);
$this->month = date('Y', $timestamp);
$this->day = 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);
Expand All @@ -600,7 +600,7 @@ function parseIso($iso) {
$this->second = substr($iso, 15, 2);
}
function getIso() {
return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second;
return $this->year.'-'.$this->month.'-'.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second;
}
function getXml() {
return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';
Expand Down

0 comments on commit 5cc966c

Please sign in to comment.