Page 1 of 1

Time Zone

Posted: May 29, 2009 11:32 pm
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: May 30, 2009 12:43 am
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: Jun 21, 2010 9:31 am
by jhall
Hi wayne.philip,

Thanks much! Exactly what I was looking for.

Re: Time Zone

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

Re: Time Zone

Posted: Sep 02, 2011 2:05 am
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: Sep 02, 2011 6:41 am
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: Sep 02, 2011 7:06 am
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: Sep 02, 2011 9:27 am
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: Sep 02, 2011 9:43 am
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: Sep 02, 2011 9:56 am
by Lapinkiller
Which version of PHP are you using ?

Re: Time Zone

Posted: Sep 02, 2011 10:02 am
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: Sep 02, 2011 1:17 pm
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?