From 70a6df58717aaf1130278bd52473d5701c66f10b Mon Sep 17 00:00:00 2001 From: haneul Date: Mon, 10 Dec 2007 13:17:23 +0000 Subject: [PATCH] fix daylong error git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3297 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/lifepod/lifepod.view.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/lifepod/lifepod.view.php b/modules/lifepod/lifepod.view.php index 5e223a1cc..b75fc9624 100644 --- a/modules/lifepod/lifepod.view.php +++ b/modules/lifepod/lifepod.view.php @@ -27,10 +27,10 @@ $this->setTemplatePath($template_path); } - function dateFormatChange($dates) { + function dateFormatChange($dates, $plus = 0) { $dates = str_replace( "T", " ", $dates); $dates = str_replace( "Z", "+0", $dates); - $dates = date("Y-m-d H:i:s", strtotime($dates)); + $dates = date("Y-m-d H:i:s", strtotime($dates) + $plus); return $dates; } @@ -57,7 +57,10 @@ } if($val->childNodes["date-end"]) { - $val->childNodes["date-end"]->body = $this->dateFormatChange($val->childNodes["date-end"]->body); + $plus = 0; + if($val->childNodes["type"]->body == "daylong") + $plus = -1; + $val->childNodes["date-end"]->body = $this->dateFormatChange($val->childNodes["date-end"]->body, $plus); } }