Time Zone
Moderators: Developer, Contributor
-
- Posts: 2
- Joined: 30 May 2009, 04:27
Time Zone
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
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
Last edited by wayne.philip on 30 May 2009, 05:49, edited 1 time in total.
-
- Posts: 2
- Joined: 30 May 2009, 04:27
Re: Time Zone
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
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
Hi wayne.philip,
Thanks much! Exactly what I was looking for.
Thanks much! Exactly what I was looking for.
-
- Posts: 4
- Joined: 02 Sep 2011, 07:04
Re: Time Zone
Somehow in UserCP I can see only one Timezone available for selection - server timezone. Why? How to add other timezones to the list?
-
- Posts: 35
- Joined: 22 Jul 2011, 12:38
Re: Time Zone
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.
-
- Posts: 4
- Joined: 02 Sep 2011, 07:04
Re: Time Zone
Well, I cannot select anything there except the timezone of the server. No other timezones are in the list. Why?
-
- Posts: 35
- Joined: 22 Jul 2011, 12:38
Re: Time Zone
No, the option there only changes the timezone for the user logged in. Changes to this setting are not visible to the other users.
-
- Posts: 4
- Joined: 02 Sep 2011, 07:04
Re: Time Zone
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.
Please look at the attached screenshot. I CANNOT select ANY timezone except for the server's default one in my Mantis profile.
- Attachments
-
- NoTimezoneToSelect.png (34.45 KiB) Viewed 47361 times
-
- Posts: 408
- Joined: 28 Jan 2011, 18:47
- Location: France
- Contact:
Re: Time Zone
Which version of PHP are you using ?
Lapinkiller,
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
French PHP developer
New look for your mantis : http://www.mantisbt.org/forums/viewtopi ... =4&t=20055
-
- Posts: 35
- Joined: 22 Jul 2011, 12:38
Re: Time Zone
5.3.6. In the ini file:
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.
Code: Select all
date.timezone = America/New_York
I apologize for my confusion. A lot of misreading posts happened on my part.
-
- Posts: 4
- Joined: 02 Sep 2011, 07:04
Re: Time Zone
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?
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?