From 8d5089e9d11cdeaffe8743b13ce37a1512c99f35 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 7 Mar 2006 21:24:49 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 544a3e868b..058595e52b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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)); + if( 'U' == $dateformatstring ) + return $i; + if ( -1 == $i || false == $i ) $i = 0;