Fix the display of human time difference when server timezone if different from blog timezone. Fixes #5970 props jhodgdon.

git-svn-id: http://svn.automattic.com/wordpress/trunk@6995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi
2008-02-23 22:11:47 +00:00
parent 93f0c00cb7
commit 8d42a5d342
4 changed files with 13 additions and 5 deletions

View File

@@ -5,6 +5,14 @@ function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) {
$m = $mysqlstring;
if ( empty( $m ) )
return false;
if( 'G' == $dateformatstring ) {
return gmmktime(
(int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
(int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )
);
}
$i = mktime(
(int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
(int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )