From 20c6baad575592cbb0d3f690bde8476fdfc21dd0 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@3633 602fd350-edb4-49c9-b593-d223f7449a82 --- 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;