mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 20:29:57 +09:00
fix daylong error
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3297 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
03ffc760b2
commit
70a6df5871
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue