phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Merged] Switch to PHP timezone handling

These requests for comments have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby ecvej » Sun Jul 25, 2010 12:37 pm

How about:

1) Determine the users current GMT offset and display only those PHP timezones that have the same offset to narrow the choice to the most likely ones they will want to choose from.

2) Show a link to "select other timezone" if they want to pick a different timezone, which will show a GUI along the lines of what others have posted above.
ecvej
Registered User
 
Posts: 1
Joined: Fri Jul 15, 2005 12:03 am

Re: [RFC] Switch to PHP timezone handling

Postby Dicky » Sun Aug 15, 2010 3:41 pm

A_Jelly_Doughnut wrote:I would implement it with the 400-long alphabetical list of the timezones, at least for now.

I agree with doing it this way. A message board I know of has a dropdown list of 368 DateTimezones with user-friendly descriptions sorted alphabetically on these descriptions by country and then by region or state. It appears they also preselect a possible timezone according to your computer's timezone/offset. I don't find it difficult at all to locate and select a timezone from this list of 368 timezones. I don't believe it would be a problem for the average user either.

php.net has 454 DateTimezones (not including legacy timezones) listed on their website yet there are only 403 in the Identifierlist
wikipedia has 405 database timezones.
Dicky
Registered User
 
Posts: 125
Joined: Tue Feb 08, 2005 4:15 am

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby EXreaction » Sun Aug 15, 2010 5:24 pm

How about having two drop downs, one with the list of timezones, and another where you can select a +- hr and it would filter the main list of timezones to show only those with some JS?
My phpBB3 Mods: Advertisement Management | User Blog Mod | Anti-Spam ACP | Advanced Subscriptions | One Click Ban | From Author PM List | FAQ Manager | Forum Sponsors | Soft Delete | Auto Database Backup | Drag 'n Drop Forum List | HTML Ranks | Enable HTML
User avatar
EXreaction
Development Team
Development Team
 
Posts: 1274
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby Oleg » Wed Jan 12, 2011 12:38 am

Possible source of inspiration:

http://edoceo.com/exemplar/php-timezone
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby Oleg » Fri Jan 28, 2011 11:01 pm

Something I discovered just now is that postgres prior to 8.0 (that is 7.3 and 7.4) does not support altering a column type in place.

The patch linked here does not appear to tackle schema upgrading at all, but migrations I implemented for my own version failed on 7.3.

A workaround would be to create a column with the desired type, copy data to it, then drop the old column. After that a vacuum is suggested by postgres to reclaim disk space.

References:

http://www.postgresql.org/docs/7.3/stat ... table.html
http://www.postgresql.org/docs/7.4/stat ... table.html
http://www.postgresql.org/docs/8.0/stat ... table.html
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby naderman » Mon Jan 31, 2011 6:53 pm

We need to come up with a clear guideline on using or not using @return void. If we had documentation on all functions it would be implicit. Technically a function returns null I believe and not void if there is no explicit return value. Not entirely sure what to do about this.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby bantu » Tue Feb 01, 2011 10:45 pm

naderman wrote:We need to come up with a clear guideline on using or not using @return void.
Yes, that makes sense.

naderman wrote:Technically a function returns null I believe and not void if there is no explicit return value.
Correct. http://php.net/manual/en/functions.returning-values.php
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 439
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby Oleg » Mon Feb 07, 2011 11:10 pm

Rebased on top of develop. fixed one conflict with http://tracker.phpbb.com/browse/PHPBB3-7369 (which does not currently load): https://github.com/p/phpbb3/compare/dev ... z-handling
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby Oleg » Mon Mar 14, 2011 2:55 am

Looks like I will be picking this up, and I decided to start on the timezone selector. I want to sort the list by timezone and provide timezone offsets next to names, which should make it fairly usable.

I plan on migrating existing users to GMT+-X timezones that I think are provided. That essentially carries over the pre-3.1 timezone behavior. Furthermore, I want to add those timezones (just the one the user is in) to the selector for existing users such that users are not required to change their timezone after board upgrade, and changing something else in board preferences does not change their timezone.

For new registrations I want to have the timezone offset detected via javascript to pre-select a timezone close to what the user would hopefully want.

The other big chunk that is missing is update code.
Oleg
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC|Accepted] Switch to PHP timezone handling

Postby nickvergessen » Wed May 04, 2011 10:37 pm

nn- wrote:Looks like I will be picking this up, and I decided to start on the timezone selector. I want to sort the list by timezone and provide timezone offsets next to names, which should make it fairly usable.

Well could you describe the way, you want to do that?
because like chris mentioned here we can not put the ~500 timezones in one dropdown?!
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 357
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Previous Next

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 8 guests