Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/204437
Change subject: Make $wgDBerrorLogTZ actually default to $wgLocaltimezone
......................................................................
Make $wgDBerrorLogTZ actually default to $wgLocaltimezone
Change-Id: I6ef84bf6b91a6783d1ff1c3dd0c4016ebf076367
---
M includes/DefaultSettings.php
M includes/Setup.php
M includes/debug/logger/LegacyLogger.php
3 files changed, 10 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/37/204437/1
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index d5801cb..4238504 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1844,11 +1844,11 @@
*
* @par Examples:
* @code
- * $wgLocaltimezone = 'UTC';
- * $wgLocaltimezone = 'GMT';
- * $wgLocaltimezone = 'PST8PDT';
- * $wgLocaltimezone = 'Europe/Sweden';
- * $wgLocaltimezone = 'CET';
+ * $wgDBerrorLogTZ = 'UTC';
+ * $wgDBerrorLogTZ = 'GMT';
+ * $wgDBerrorLogTZ = 'PST8PDT';
+ * $wgDBerrorLogTZ = 'Europe/Sweden';
+ * $wgDBerrorLogTZ = 'CET';
* @endcode
*
* @since 1.20
diff --git a/includes/Setup.php b/includes/Setup.php
index e281768..b4a9885 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -551,6 +551,10 @@
$wgLocalTZoffset = date( 'Z' ) / 60;
}
+if ( !$wgDBerrorLogTZ ) {
+ $wgDBerrorLogTZ = $wgLocaltimezonel
+}
+
// Useful debug output
if ( $wgCommandLineMode ) {
$wgRequest = new FauxRequest( array() );
diff --git a/includes/debug/logger/LegacyLogger.php
b/includes/debug/logger/LegacyLogger.php
index edaef4a..6027375 100644
--- a/includes/debug/logger/LegacyLogger.php
+++ b/includes/debug/logger/LegacyLogger.php
@@ -253,7 +253,7 @@
global $wgDBerrorLogTZ;
static $cachedTimezone = null;
- if ( $wgDBerrorLogTZ && !$cachedTimezone ) {
+ if ( !$cachedTimezone ) {
$cachedTimezone = new DateTimeZone( $wgDBerrorLogTZ );
}
--
To view, visit https://gerrit.wikimedia.org/r/204437
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ef84bf6b91a6783d1ff1c3dd0c4016ebf076367
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits