Don't add UTC offset again when formatting 'U' in mysql2date. Props masquerade. fixes #2537

git-svn-id: http://svn.automattic.com/wordpress/trunk@3633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-03-07 21:24:49 +00:00
parent e7feb40925
commit 8d5089e9d1
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ function mysql2date($dateformatstring, $mysqlstring, $translate = true) {
} }
$i = mktime(substr($m,11,2),substr($m,14,2),substr($m,17,2),substr($m,5,2),substr($m,8,2),substr($m,0,4)); $i = mktime(substr($m,11,2),substr($m,14,2),substr($m,17,2),substr($m,5,2),substr($m,8,2),substr($m,0,4));
if( 'U' == $dateformatstring )
return $i;
if ( -1 == $i || false == $i ) if ( -1 == $i || false == $i )
$i = 0; $i = 0;