Re: Letting users select timezone

[email protected] ("Tatsuhiko Miyagawa")
Newsgroups perl.datetime
Message-ID <[email protected]>
On Tue, Jan 20, 2009 at 3:02 AM, David Cantrell
<[email protected]> wrote:

> From a practical point of view, you probably want users to select first from
> a list of areas (eg Europe, or Africa) and then a city within that area, to
> avoid having a very long list.  Even sorted alphabetically, a long list can
> be a pain from an accessibility point of view.

You can get the user's country using their preference, or from
Accept-Language HTTP header or using IP-to-geo mapping and then use
DateTime::TimeZone->names_in_country($cc) to get the list of available
TZ names.

-- 
Tatsuhiko Miyagawa
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.