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:
zero 2009-06-20 03:09:13 +00:00
parent 7a61db14f3
commit 44f5930b32

View file

@ -347,8 +347,12 @@
function getDateStr($format, $str) {
if(strtotime($str)===-1 || strtotime($str)===false) {
$t = str_replace(array('-','T',':','.',' '),'',trim($str));
return zdate($t, $format);
$type = substr($GLOBALS['_time_zone'],0,1);
$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 {
return date($format, strtotime(trim($str)));
}