From ca5ec022ae1d6dcc7801720b67af496060fd542a Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 28 Mar 2007 15:53:15 +0000 Subject: [PATCH] Switch to always return GMT time. --- includes/DatabasePostgres.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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); -- 2.20.1