From 9ad58598da5f31a4a0bd47fbef54302f7546a8c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 14 Oct 2010 15:59:20 +0000 Subject: [PATCH] * (Bug 25451) Language::time() and ::date() misfunction when given timestamps in wrong format Convert given times to correct format like ::timeandate() already does. Based on patch by Thorsten Glaser . --- languages/Language.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/languages/Language.php b/languages/Language.php index 09c66adc75..fa605ab477 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1496,6 +1496,7 @@ class Language { * @return string */ function date( $ts, $adj = false, $format = true, $timecorrection = false ) { + $ts = wfTimestamp( TS_MW, $ts ); if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); } @@ -1514,6 +1515,7 @@ class Language { * @return string */ function time( $ts, $adj = false, $format = true, $timecorrection = false ) { + $ts = wfTimestamp( TS_MW, $ts ); if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); } -- 2.20.1