strtotime 함수의 결과가 -1이거나 false 일경우 svn log의 시간을 문자열로 체크하도록 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6617 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-06-20 02:57:41 +00:00
parent ecea1a5929
commit d63369b5db

View file

@ -346,8 +346,12 @@
}
function getDateStr($format, $str) {
$t = str_replace(array('-','T',':','.'),'',$str);
return zdate($t, $format);
if(strtotime($str)===-1 || strtotime($str)===false) {
$t = str_replace(array('-','T',':','.',' '),'',trim($str));
return zdate($t, $format);
} else {
date($format, strtotime(trim($str)));
}
}
function getTimeGap($str, $dayStr = 'day', $hourStr = 'hour', $minStr = 'minute') {