$wgAutoConfirmCount (defaulting to zero, naturally).
* Added rate limiter for Special:Emailuser
* Private logs can now be created using $wgLogRestrictions
+* Databases using timestamps with time zone (Postgres) can now set $wgDBtimezone
== New features since 1.9 ==
* (bug 6937) Introduce "statistics-footer" message, appended to
based on Jeff Merkey's mediawiki-1.9.3.WG-20070316.tar.gz.bz2 archive.
* Introduce PageHistoryBeforeList and PageHistoryLineEnding hooks; see docs/hooks.txt
for more information
+* (bug 9299) Allow user timezones to work with Postgres
== Maintenance ==
* New script maintenance/language/checkExtensioni18n.php used to check i18n
$article->updateRevisionOn( $wgDatabase, $revision );
}
+ # If the database has a specific timezone, and its not the default(0), change LocalSettings.php
+ if ($wgDBtimezone != 0) {
+ $local = preg_replace('/(wgDBtimezone\s+= )0/', "$1$wgDBtimezone", $local);
+ }
+
/* Write out the config file now that all is well */
print "<li style=\"list-style: none\">\n";
print "<p>Creating LocalSettings.php...</p>\n\n";
\$wgDBuser = \"{$slconf['DBuser']}\";
\$wgDBpassword = \"{$slconf['DBpassword']}\";
\$wgDBport = \"{$slconf['DBport']}\";
+\$wgDBtimezone = 0;
\$wgDBprefix = \"{$slconf['DBprefix']}\";
# Schemas for Postgres
$wgDBserver = 'localhost';
/** database port number */
$wgDBport = '';
+/** timezone the database is using */
+$wgDBtimezone = 0;
/** name of the database */
$wgDBname = 'wikidb';
/** */
* @return int
*/
function userAdjust( $ts, $tz = false ) {
- global $wgUser, $wgLocalTZoffset;
+ global $wgUser, $wgLocalTZoffset, $wgDBtimezone;
if (!$tz) {
$tz = $wgUser->getOption( 'timecorrection' );
$hrDiff = intval( $tz );
}
+ # Account for databases that use timestamp with time zone
+ if ( isset($wgDBtimezone) ) {
+ $hrDiff -= $wgDBtimezone;
+ }
+
# No difference ? Return time unchanged
if ( 0 == $hrDiff && 0 == $minDiff ) { return $ts; }