Per bug 26612, set datestyle and timezone in open() rather than relying on $wgDBuser...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 23 Feb 2011 13:51:00 +0000 (13:51 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 23 Feb 2011 13:51:00 +0000 (13:51 +0000)
includes/db/DatabasePostgres.php

index 01f41ee..487fabe 100644 (file)
@@ -198,7 +198,9 @@ class DatabasePostgres extends DatabaseBase {
                        $this->doQuery( "SET client_min_messages = 'ERROR'" );
                }
 
-               $this->doQuery( "SET client_encoding='UTF8'" );
+               $this->query( "SET client_encoding='UTF8'", __METHOD__ );
+               $this->query( "SET datestyle = 'ISO, YMD'", __METHOD__ );
+               $this->query( "SET timezone = 'GMT'", __METHOD__ );
 
                global $wgDBmwschema;
                if ( isset( $wgDBmwschema )