Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 29374df23ea0
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a5b0f60c2ca5
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 14, 2012

  1. Revert "Fixes #14086: Default administrator timezone to server timezo…

    …ne."
    
    This reverts commit 15c23b1.
    dregad committed Nov 14, 2012
    Copy the full SHA
    fc67be8 View commit details
  2. Fix initialization of default timezone in core.php

    Fixes #14084, see also related issue #14009 for 1.2.x branch
    dregad committed Nov 14, 2012
    Copy the full SHA
    12da98b View commit details
  3. Documentation: added $g_default_timezone to admin guide

    Fixes #11854
    dregad committed Nov 14, 2012
    Copy the full SHA
    a5b0f60 View commit details
Showing with 44 additions and 11 deletions.
  1. +10 −11 config_defaults_inc.php
  2. +6 −0 core.php
  3. +28 −0 docbook/Admin_Guide/en-US/Configuration.xml
21 changes: 10 additions & 11 deletions config_defaults_inc.php
Original file line number Diff line number Diff line change
@@ -1122,23 +1122,22 @@
*/
$g_calendar_date_format = 'Y-m-d H:i';

/**************************
/******************************
* MantisBT TimeZone Settings *
**************************/
******************************/

/**
* Default timezone to use in MantisBT.
* See http://us.php.net/manual/en/timezones.php
* for a list of valid timezones.
* Default timezone to use in MantisBT
*
* If this config is left blank, it will be initialized by calling function
* {@link http://php.net/date-default-timezone-get date_default_timezone_get()}
* to determine the default timezone.
* Note that this function's behavior was modified in PHP 5.4.0.
*
* The date_default_timezone_get() calculates timezone based on the following:
* 1. Reading the TZ environment variable (if non empty)
* 2. Reading the value of the date.timezone php.ini option (if set)
* 3. Querying the host operating system (if supported and allowed by the OS)
* 4. If none of the above succeed, will return a default timezone of UTC.
* @link http://php.net/timezones List of Supported Timezones
* @global string $g_default_timezone
*/
$g_default_timezone = date_default_timezone_get();
$g_default_timezone = '';

/**************************
* MantisBT News Settings *
6 changes: 6 additions & 0 deletions core.php
Original file line number Diff line number Diff line change
@@ -252,6 +252,12 @@ function __autoload( $className ) {
// if a default timezone is set in config, set it here, else we use php.ini's value
// having a timezone set avoids a php warning
date_default_timezone_set( config_get_global( 'default_timezone' ) );
} else {
# To ensure proper detection of timezone settings issues, we must not
# initialize the default timezone when executing admin checks
if( basename( $g_short_path ) != 'check' ) {
config_set_global( 'default_timezone', date_default_timezone_get(), true );
}
}

require_api( 'authentication_api.php' );
28 changes: 28 additions & 0 deletions docbook/Admin_Guide/en-US/Configuration.xml
Original file line number Diff line number Diff line change
@@ -1078,6 +1078,34 @@

</section>

<section id="admin.config.timezone">
<title>Time Zone</title>

<variablelist>
<varlistentry>
<term>$g_default_timezone</term>
<listitem>
<para>Default timezone to use in MantisBT.
This must be set to one of the values specified in the
<ulink url="http://php.net/timezones ">
List of Supported Timezones</ulink>.
</para>
<para>If this config is left blank (default), it will be
initialized by calling function
<ulink url="http://php.net/date-default-timezone-get">
date_default_timezone_get()</ulink>
to determine the default timezone.
With PHP >= 5.3, this will result in a system warning if
the timezone has not been defined in
<ulink url="http://php.net/date.timezone">php.ini</ulink>.
Note that this function's behavior was modified in PHP 5.4.0.
</para>
<para>
</para>
</listitem>
</varlistentry>
</variablelist>
</section>

<section id="admin.config.news">
<title>News</title>