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] Switch to PHP timezone handling

Postby 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
ToonArmy
Registered User
 
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK

Re: [RFC] Switch to PHP timezone handling

Postby 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
Erik Frèrejean
Registered User
 
Posts: 207
Joined: Thu Oct 25, 2007 2:25 pm
Location: surfnet

Re: [RFC] Switch to PHP timezone handling

Postby 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
ToonArmy
Registered User
 
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK

Re: [RFC] Switch to PHP timezone handling

Postby 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.
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: 1259
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Switch to PHP timezone handling

Postby 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
ToonArmy
Registered User
 
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK

Re: [RFC] Switch to PHP timezone handling

Postby 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.
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: 1259
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Switch to PHP timezone handling

Postby 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
ToonArmy
Registered User
 
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK

Re: [RFC] Switch to PHP timezone handling

Postby 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


The first page of the popup contains the "categories":
step 1.png


When you click on one of them, the category is opened:
step 2.png


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 418 times
select_timezone_popup.diff
(3.25 KiB) Downloaded 425 times
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: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: [RFC] Switch to PHP timezone handling

Postby 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
rxu
Registered User
 
Posts: 87
Joined: Tue Apr 04, 2006 4:28 pm

Re: [RFC] Switch to PHP timezone handling

Postby 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.
Nelsaidi
Registered User
 
Posts: 122
Joined: Tue Nov 11, 2008 5:44 pm

Previous Next

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: DavidIQ, KnocksX and 9 guests