Adjust datetime in email confirmation email
authorumherirrender <umherirrender_de.wp@web.de>
Mon, 30 Nov 2015 20:38:12 +0000 (21:38 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 3 Dec 2015 18:58:00 +0000 (19:58 +0100)
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

includes/user/User.php

index 3d1aa7e..1de4008 100644 (file)
@@ -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() );
        }
 
        /**