Page 1 of 1

Time Zone

Posted: 30 May 2009, 04:32
by wayne.philip
Hi .. Anybody know where I can set the time difference between my server (in the USA) and my developers / clients (in Namibia) 8 hrs difference and as you may imagine my developers are OK but clients will always be clients (read users) and the time difference confuses them.


Ok Solved it.

Add this line to the config.inc file
--
putenv("TZ=Africa/Windhoek");
--
Find you time zone here..
http://www.php.net/timezones

Re: Time Zone

Posted: 30 May 2009, 05:43
by wayne.philip
Ok .. Been working on it and have the following to add.
Setting up a time zone per user is not doable yet.
However if your users are in one time zone or close together where the difference is not so important you can add this line to your config.inc.
---
putenv("TZ=Africa/Windhoek");
---
Obviously the TZ value needs to be correct.
You can get these values here.

http://www.php.net/timezones

Ok Hope this helps anybody else with the same problem

Re: Time Zone

Posted: 21 Jun 2010, 14:31
by jhall
Hi wayne.philip,

Thanks much! Exactly what I was looking for.

Re: Time Zone

Posted: 21 Jun 2010, 19:31
by atrol
In current version of MantisBt every user can set the timezone in his own account settings.

Re: Time Zone

Posted: 02 Sep 2011, 07:05
by FractalizeR
Somehow in UserCP I can see only one Timezone available for selection - server timezone. Why? How to add other timezones to the list?

Re: Time Zone

Posted: 02 Sep 2011, 11:41
by andrea.mills
For Mantis 1.2.6, a user can go to Account->Preferences->Timezone and select the timezone that is appropriate for him/her. Server definitions for timezone exist in the php.ini file. You can see a reference here: http://www.php.net/manual/en/timezones.php.

Re: Time Zone

Posted: 02 Sep 2011, 12:06
by FractalizeR
Well, I cannot select anything there except the timezone of the server. No other timezones are in the list. Why?

Re: Time Zone

Posted: 02 Sep 2011, 14:27
by andrea.mills
No, the option there only changes the timezone for the user logged in. Changes to this setting are not visible to the other users.

Re: Time Zone

Posted: 02 Sep 2011, 14:43
by FractalizeR
Well, I think you misunderstand me. Is my English really so bad? :)

Please look at the attached screenshot. I CANNOT select ANY timezone except for the server's default one in my Mantis profile.

Re: Time Zone

Posted: 02 Sep 2011, 14:56
by Lapinkiller
Which version of PHP are you using ?

Re: Time Zone

Posted: 02 Sep 2011, 15:02
by andrea.mills
5.3.6. In the ini file:

Code: Select all

date.timezone = America/New_York
The dropdown for Timezone on my Mantis is filled with every possible timezone...I don't have any Mantis config_inc.php or other customizable code relating to timezones.

I apologize for my confusion. A lot of misreading posts happened on my part. :oops:

Re: Time Zone

Posted: 02 Sep 2011, 18:17
by FractalizeR
Well, I've identified the problem

core/print_api.php

# Print the option list for timezones
function print_timezone_option_list( $p_timezone ) {
if ( !function_exists( 'timezone_identifiers_list' ) ) {
echo '<option value="', $p_timezone, '" selected="selected">', $p_timezone, '</option>';
return;
}

http://php.net/manual/en/function.timez ... s-list.php
(PHP 5 >= 5.2.0)

If PHP version is lower, that 5.2, you will NOT have a possibility to select any timezone different from the default one in the user's profile. Is this a bug or an expected behavior?