From: umherirrender Date: Mon, 30 Nov 2015 20:38:12 +0000 (+0100) Subject: Adjust datetime in email confirmation email X-Git-Tag: 1.31.0-rc.0~8700^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=b0a45843e75391a6fa8f85a5773515a23b7d43c7;p=lhc%2Fweb%2Fwiklou.git Adjust datetime in email confirmation email Use the correct timezone when setting the expiry timestamp in the email confirmation. Using Language::userDateAndTime to avoid indirect use of $wgUser, so it is always the timezone used of the user the message gets send for. Bug: T29158 Change-Id: Ieb74b72a4255d9d652f828d1879882dff4b45379 --- diff --git a/includes/user/User.php b/includes/user/User.php index 3d1aa7e585..1de4008b99 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -4279,10 +4279,10 @@ class User implements IDBAccessObject { $this->getRequest()->getIP(), $this->getName(), $url, - $wgLang->timeanddate( $expiration, false ), + $wgLang->userTimeAndDate( $expiration, $this ), $invalidateURL, - $wgLang->date( $expiration, false ), - $wgLang->time( $expiration, false ) )->text() ); + $wgLang->userDate( $expiration, $this ), + $wgLang->userTime( $expiration, $this ) )->text() ); } /**