Skip to content

Commit 15c23b1

Browse files
committedMay 6, 2012
Fixes #14086: Default administrator timezone to server timezone.
The timezone is now defaulted to date_default_timezone_get() rather than empty string which defaults to date_default_timezone_get() in some code paths. This fixes the issue where user preferences picked up the first in the list rather than the default timezone.
1 parent 208cb76 commit 15c23b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎config_defaults_inc.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1110,15 +1110,15 @@
11101110
* Default timezone to use in MantisBT.
11111111
* See http://us.php.net/manual/en/timezones.php
11121112
* for a list of valid timezones.
1113-
* Note: if this is left blank, we use the result of
1114-
* date_default_timezone_get() i.e. in order:
1113+
*
1114+
* The date_default_timezone_get() calculates timezone based on the following:
11151115
* 1. Reading the TZ environment variable (if non empty)
11161116
* 2. Reading the value of the date.timezone php.ini option (if set)
11171117
* 3. Querying the host operating system (if supported and allowed by the OS)
11181118
* 4. If none of the above succeed, will return a default timezone of UTC.
11191119
* @global string $g_default_timezone
11201120
*/
1121-
$g_default_timezone = '';
1121+
$g_default_timezone = date_default_timezone_get();
11221122

11231123
/**************************
11241124
* MantisBT News Settings *

0 commit comments

Comments
 (0)
Please sign in to comment.