Release status: experimental
|Implementation||User interface, Ajax|
|Description||Timezone selection map for Special:Preferences|
|Author(s)||Brion Vibber (Brion VIBBERtalk)|
|Check usage and version matrix|
Time Zone Picker adds an experimental time zone picker map to Special:Preferences' date/time panel.
PHP's date-and-time functions pass through latitude and longitude coordinates from the system timezone database, which we use here to plot on a map.
To prune things down, only zone settings that match the currently selected offset are shown on the map; this lets us show what likely candidates are available that match either the configured server offset or the browser settings, then pick one from the map. (This pruning implements a form of my feature request in bugzilla:16763)
Selecting a new setting (a specific zone or the server, guess, or other options) from the drop-down updates the map automatically, and centers the view on the selected offset.
The map can be zoomed in 2x by double-clicking; this may require vertical scrolling in some instances.
Note on the location information: we do not have boundaries available, and even if we did it wouldn't be wise to use them as borders are in dispute in a number of countries. Available locations are for the cities that are representative.
The map has a shading overlay that highlights a fairly generic range that approximates the size of a time zone.
To install this extension, add the following to LocalSettings.php:
There are no configuration options.
While the master code for this extension lives in Wikimedia's SVN repository, I also have a git repo where I may have some experimental branches:
Known bugs 
- doesn't pick server mode right
- doesn't check for compatibility -- almost certain not to work right on IE6
- double-click to zoom can select something you didn't intend to
- it's hard to distinguish lots of items close together in some areas like Europe and the Caribbean, even in the 2x zoomed map
- pretty sure server default isn't being handled right if not UTC
- clean up rambling code
- find a cleaner way to get non-current items showing (can show them but it makes the map much busier)
- redo the map refreshes so we're not removing and recreating everything when you click something already on the map!
- make map zoom work on iPad (?)
- show the TZ offset in HH:MM clearly at the top of the map, with selectors to jump over to other zones for browsing :D
- South Pole entry is still a little off
- scroll automatically in zoomed mode
- clearer controls for zoom
- (perhaps) use geolocation info to help pick something