From ad2ea9d386bed65b4c1e964be55c2cc8588c53a4 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 23 Feb 2011 13:51:00 +0000 Subject: [PATCH] Per bug 26612, set datestyle and timezone in open() rather than relying on $wgDBuser having specific settings. --- includes/db/DatabasePostgres.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 01f41ee85e..487fabe44d 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -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 ) -- 2.20.1