mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 16:49:58 +09:00
svn 시간값을 파싱할때 php5에서는 strtotime으로 처리 가능한 반면 php4에서는 strtotime 처리 불가능하여 time zone적용하여 제대로 시간값을 가져오도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6619 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7a61db14f3
commit
44f5930b32
1 changed files with 6 additions and 2 deletions
|
|
@ -347,8 +347,12 @@
|
||||||
|
|
||||||
function getDateStr($format, $str) {
|
function getDateStr($format, $str) {
|
||||||
if(strtotime($str)===-1 || strtotime($str)===false) {
|
if(strtotime($str)===-1 || strtotime($str)===false) {
|
||||||
$t = str_replace(array('-','T',':','.',' '),'',trim($str));
|
$type = substr($GLOBALS['_time_zone'],0,1);
|
||||||
return zdate($t, $format);
|
$hour = substr($GLOBALS['_time_zone'],1,2);
|
||||||
|
$min = substr($GLOBALS['_time_zone'],3,2);
|
||||||
|
$g = $hour*60*60 + $min * 60;
|
||||||
|
$t = ztime(str_replace(array('-','T',':','.',' '),'',trim($str)))+$g;
|
||||||
|
return date($format, $t);
|
||||||
} else {
|
} else {
|
||||||
return date($format, strtotime(trim($str)));
|
return date($format, strtotime(trim($str)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue