From: Greg Sabino Mullane Date: Wed, 28 Mar 2007 15:53:15 +0000 (+0000) Subject: Switch to always return GMT time. X-Git-Tag: 1.31.0-rc.0~53562 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=ca5ec022ae1d6dcc7801720b67af496060fd542a;p=lhc%2Fweb%2Fwiklou.git Switch to always return GMT time. --- diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index bed25d8547..87e8d80bed 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -410,6 +410,23 @@ class DatabasePostgres extends Database { print "
  • Schema \"$wgDBmwschema\" exists and is owned by \"$user\". Excellent.
  • \n"; } + ## Always return GMT time to accomodate the existing integer-based timestamp assumption + print "
  • Setting the timezone to GMT for user \"$user\" ..."; + $SQL = "ALTER USER $safeuser SET timezone = 'GMT'"; + $result = pg_query($this->mConn, $SQL); + if (!$result) { + print "FAILED.
  • \n"; + dieout(""); + } + print "OK\n"; + ## Set for the rest of this session + $SQL = "SET timezone = 'GMT'"; + $result = pg_query($this->mConn, $SQL); + if (!$result) { + print "
  • Failed to set timezone
  • \n"; + dieout(""); + } + ## Fix up the search paths if needed print "
  • Setting the search path for user \"$user\" ..."; $path = $this->quote_ident($wgDBmwschema);