From: Ilmari Karonen Date: Sat, 9 Feb 2008 20:39:32 +0000 (+0000) Subject: (bug 12815) Signature timestamps are now given in the time zone specified by X-Git-Tag: 1.31.0-rc.0~49541 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=51b793396cd0ce7ebed2ebcdfd9682cc0df24741;p=lhc%2Fweb%2Fwiklou.git (bug 12815) Signature timestamps are now given in the time zone specified by $wgLocaltimezone. Formerly the timestamp itself was always in UTC, while the timezone code in parentheses came from $wgLocaltimezone or, if unset, from the server environment. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5444814cf2..72c43f754b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -376,6 +376,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN is disabled * (bug 12869) Magnify icon alignment should be adjusted using linked CSS * Fixing message cache updates for MediaWiki messages moves +* (bug 12815) Signature timestamps were always in UTC, even if the timezone code + in parentheses after them claimed otherwise == Parser changes in 1.12 == diff --git a/includes/Parser.php b/includes/Parser.php index 85864cd3de..15490691ad 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3657,16 +3657,20 @@ class Parser * the database, we use $wgContLang here in order to give * everyone the same signature and use the default one rather * than the one selected in each user's preferences. + * + * (see also bug 12815) */ + $ts = $this->mOptions->getTimestamp(); + $tz = 'UTC'; if ( isset( $wgLocaltimezone ) ) { + $unixts = wfTimestamp( TS_UNIX, $ts ); $oldtz = getenv( 'TZ' ); putenv( 'TZ='.$wgLocaltimezone ); - } - $d = $wgContLang->timeanddate( $this->mOptions->getTimestamp(), false, false) . - ' (' . date( 'T' ) . ')'; - if ( isset( $wgLocaltimezone ) ) { + $ts = date( 'YmdHis', $unixts ); + $tz = date( 'T', $unixts ); # might vary on DST changeover! putenv( 'TZ='.$oldtz ); } + $d = $wgContLang->timeanddate( $ts, false, false ) . " ($tz)"; # Variable replacement # Because mOutputType is OT_WIKI, this will only process {{subst:xxx}} type tags