[RFC|Merged] Switch to PHP timezone handling

These requests for comments/change 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.
Post Reply
User avatar
ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: [RFC] Switch to PHP timezone handling

Post by ToonArmy » Sat Jul 10, 2010 1:25 pm

Anybody got a bright idea on how to present the timezone list for users to chose, there are like 500 timezones known to PHP just dropping them all in a drop down would be crazy.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

User avatar
Erik Frèrejean
Registered User
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet
Contact:

Re: [RFC] Switch to PHP timezone handling

Post by Erik Frèrejean » Sat Jul 10, 2010 1:30 pm

Something like on php.net? (http://php.net/manual/en/timezones.php).
First a continent selector and based upon that display a drop down with the timezones in that continent, that would make the amount of items usable. You could do that through a bit of javascript so that users with js turned off get the whole list.
Available on .com
Support Toolkit developer

User avatar
ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: [RFC] Switch to PHP timezone handling

Post by ToonArmy » Sat Jul 10, 2010 5:16 pm

America still has somewhere in the region of 150 timezones on it's own.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Switch to PHP timezone handling

Post by EXreaction » Sat Jul 10, 2010 5:44 pm

You could maybe use categories and some javascript.
  • North America
  • South America
  • Europe
  • Asia
  • Africa
  • Antartica
North America
  • Canada
  • United States
  • Mexico
  • Other
North America > United States
  • Pacific
  • Central
  • Eastern
North America > United States > Central
  • Chicago
  • Detrioit
  • etc
North America > United States > Central > Chicago

There would be the navigation links and selection box below it. The clicking on the navigation links would bring you back to that category.

I am not sure how much info you can get from the user's browser of the timezone, but autoselecting would be fantastic.

User avatar
ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: [RFC] Switch to PHP timezone handling

Post by ToonArmy » Sat Jul 10, 2010 10:18 pm

EXreaction wrote:You could maybe use categories and some javascript.
I was hoping to avoid categorising them myself.
EXreaction wrote:I am not sure how much info you can get from the user's browser of the timezone, but autoselecting would be fantastic.
Javascript will give you an offset not a timezone.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Switch to PHP timezone handling

Post by EXreaction » Sat Jul 10, 2010 10:22 pm

With an offset you'd have to give the ability to list locations by their offset to let the user select.

User avatar
ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: [RFC] Switch to PHP timezone handling

Post by ToonArmy » Sat Jul 10, 2010 10:44 pm

EXreaction wrote:With an offset you'd have to give the ability to list locations by their offset to let the user select.
Interesting thought, shall investigate.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC] Switch to PHP timezone handling

Post by nickvergessen » Sun Jul 11, 2010 10:08 am

I don't really like the idea, of guessing by some browser-staff where the user comes from.

I'd go with some kind of pop up?
I implemented this:

On the UCP screen there's a little link which opens the popup, the timezone is written to an input field.
step 0.png
(47.57 KiB) Downloaded 5657 times
The first page of the popup contains the "categories":
step 1.png
step 1.png (34.53 KiB) Viewed 9559 times
When you click on one of them, the category is opened:
step 2.png
(27.67 KiB) Downloaded 5657 times
If you than click on a timezone the name is inserted in the input field.

phpbb would than verify, that the timezone is valid

Code: Select all

in_array(request_var('timezone', ''), DateTimeZone::listIdentifiers())
and you're done ;)
Attachments
ucp_select_timezone.rar
Template-file
(761 Bytes) Downloaded 3129 times
select_timezone_popup.diff
(3.25 KiB) Downloaded 3020 times
Member of the Development-TeamNo Support via PM

User avatar
rxu
Registered User
Posts: 126
Joined: Tue Apr 04, 2006 4:28 pm
Contact:

Re: [RFC] Switch to PHP timezone handling

Post by rxu » Sun Jul 11, 2010 10:16 am

I wouldn't even try to list all available timezones regardless of using categories/etc, since at least 1) it's pain to make such a simple action to involve several steps to go and 2) supported timezones list could vary from release to release.
Instead of it, I'd restrict selection with some general timezones list (like we already have for instance) and put a link to the List of supported timezones, making possible to set it custom with a text field (similar to date format adjustment we already have) by entering the timezone value directly.
Image

Nelsaidi
Registered User
Posts: 122
Joined: Tue Nov 11, 2008 5:44 pm

Re: [RFC] Switch to PHP timezone handling

Post by Nelsaidi » Sun Jul 11, 2010 10:45 am

Errr, if I signed up to a forum and saw a massive list to go through I wouldnt be bothered, you want to give users a small presentable list. Narrowing it down by JS/GeoIP is a good idea, but its too much to ask for users to do all that.

Whilst technically better, do most users realise the difference between current timezone and the proposed system? I only found out after I read an article on PHP dates, then again becoming more accurate is a goal.

Post Reply