FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Time zone glitch returns?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Time zone glitch returns? [message #31129] Tue, 04 April 2006 03:27 Go to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Some time ago, I modified the file tz.inc.t to fix a glitch in the individual time zone setting. The fix was:

Quote:

Changed line 24 from:

} else if (strncasecmp(PHP_OS, 'WIN', 3 ) !== false) {

to:

} else if (!strncasecmp(PHP_OS, 'WIN', 3)) {


Now it's back to displaying Eastern time no matter what the individual user sets in the Settings tab of the UserCP.
Re: Time zone glitch returns? [message #31138 is a reply to message #31129] Tue, 04 April 2006 13:46 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
What OS are you using, are the other timezones that are being selected available? Also what version of PHP are you using?

FUDforum Core Developer
Re: Time zone glitch returns? [message #31142 is a reply to message #31138] Tue, 04 April 2006 18:46 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Tue, 04 April 2006 08:46

What OS are you using, are the other timezones that are being selected available? Also what version of PHP are you using?


I'm pretty sure nothing has changed:

O/S - FreeBSD Ver - 4.11-STABLE (GENERIC) #1: Wed Nov 9 11:33:21 EST 2005
PHP - ver 4.4.1 (cli) (built: Nov 9 2005 16:54:04)

What do you mean about time zones being available? Isn't it just a matter of the software adding or subtracting hours to adjust to other time zones?

Thanks.
Re: Time zone glitch returns? [message #31147 is a reply to message #31142] Tue, 04 April 2006 23:07 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
OK, never knew this setting existed:

see if the /var/zoneinfo folder contains the time zone info

Looking into it. Thanks.

...Bob
Re: Time zone glitch returns? [message #31160 is a reply to message #31129] Wed, 05 April 2006 19:11 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
All of the zoneinfo data is there. It is actually in /usr/share/ zoneinfo also /etc/localtime is setup correctly. As far as I can tell this is all setup properly.

Any other ideas?

...Bob

Re: Time zone glitch returns? [message #31165 is a reply to message #31160] Thu, 06 April 2006 02:37 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The forum sets timezones by setting the TZ environment variable. Try making a small PHP script that does that with the TimeZone you want to use and them use strftime() function to output some date format. See if the times change based on the timezone.

FUDforum Core Developer
Re: Time zone glitch returns? [message #31169 is a reply to message #31165] Thu, 06 April 2006 02:46 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Wed, 05 April 2006 19:37

The forum sets timezones by setting the TZ environment variable. Try making a small PHP script that does that with the TimeZone you want to use and them use strftime() function to output some date format. See if the times change based on the timezone.


Is that so the user can set the time zone in the Settings tab of the UserCP and have that time displayed? I see this forum works fine. I just set mine to U.S./Phoenix/MST and it now displays that time zone for me. I have my own user on my own forum also set to MST, but it displays Eastern Daylight time. Why would mine work differently?

Thanks.
Re: Time zone glitch returns? [message #31171 is a reply to message #31169] Thu, 06 April 2006 02:50 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Basically the admin can set a generic default inside the admin control panel. But each user can also set their own timezone inside their profile.

Do the names of the timezones on this forum and your forum match or does your forum show different timezone values?


FUDforum Core Developer
Re: Time zone glitch returns? [message #31175 is a reply to message #31171] Thu, 06 April 2006 02:55 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Ilia wrote on Wed, 05 April 2006 19:50

Basically the admin can set a generic default inside the admin control panel. But each user can also set their own timezone inside their profile.

Do the names of the timezones on this forum and your forum match or does your forum show different timezone values?


They are the same.

I do have EDT set as the default, but if a user sets a different time zone, it still displays the default one.

[Updated on: Thu, 06 April 2006 02:58]

Report message to a moderator

Re: Time zone glitch returns? [message #31183 is a reply to message #31175] Thu, 06 April 2006 18:14 Go to previous messageGo to next message
BobB is currently offline  BobB   United States
Messages: 165
Registered: April 2005
Location: Tucson, AZ
Karma: 0
Senior Member
Since this forum works OK and so does another one I know about, this problem appears to be unique to mine. It must be a configuration issue of some kind, maybe permissions. I'll have to track it down.

Thanks, and sorry about the "Bug Report", since this is not a bug in the forum software.

...Bob
Re: Time zone glitch returns? [message #31189 is a reply to message #31183] Fri, 07 April 2006 00:37 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can write a tiny PHP script that would export TZ variable to a timezone that the user selected and then use strftime() function to output the date. If you see that TZ change had done nothing as far as the date, you know something is not working correctly on your system when it comes to timezones.

FUDforum Core Developer
Re: Time zone glitch returns? [message #34614 is a reply to message #31183] Thu, 09 November 2006 20:26 Go to previous messageGo to next message
dardhal is currently offline  dardhal   Spain
Messages: 9
Registered: November 2006
Location: Spain
Karma: 0
Junior Member
First of all, this is my first message in the forum (just registered), and would like to thank the FUDforum developers and community their great job with this piece of software. It's great, and after some investigation with the "usual suspects" in the forum software arena, I think FUDforum is the one with more advanced and convenient feature set. Just two features I greatly appreciate, out of the box attachment support and out of the box resizeable text entry for messages. Say goodbye to heavily annoying 40x10 and the like text entries. Thank you again.

Now, back on topic. It's been several months since the last post in this topic, but I have recently (in the last few days) installed a FUDforum 2.7.6 at a remote location and I am also experiencing some time zone issues. Although I am located in continental Spain (GMT+1 this time of the year) the server is located somewhere the USA (CST time zone, GMT-6). Well, no matter which default timezone I select in the Global Settings Manager, times at the bottom of each page seem not to follow the change. This happens browsing the forums as an anonymous (non authenticated) user, which has all his privileges removes but for the ones that allows it to browse just one public access forum.

However, if I log in as a user and set the user's time zone, all times show correctly. However, it seems like after the authenticated, non-administrator, user has log in, also anonymous users see the correct times. However, the FUDforum administrator keeps seeing the wrong times, that seems to be local system time plus one hour when the global forum installation timezone setting is "Spain/Mainland" (currently, GMT+1).

I hope this information is of some use for the developers, which I thank again for their great piece of software.
Re: Time zone glitch returns? [message #34623 is a reply to message #34614] Fri, 10 November 2006 14:59 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The global timezone is only used for anonymous users, each registered user can pick a timezone o their choice in their profile. The timezone value depends on the system support the timezone, so if your system does not support the selected value, the system default will be used.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Forum statistic (2.6.11)
Next Topic: Fudforum messages in DB and rdf/pdf
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 14:36:19 GMT 2024

Total time taken to generate the page: 0.02755 seconds