Re: Is there timezone data for any Indian cities such as Mumbai, Dehli, &c.?

[email protected] (Jim Monty)
Newsgroups perl.datetime
Message-ID <[email protected]>
Ted wrote:
> Jim wrote:
> > For a convenient list of all the time zones in the tz database, see
> > http://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
>
> Given that it seems the entries are generaly 'continent/city', is there
> something in DateTime that will take any city or state and lookup the entry
> for the closest city? Or is that something I'll have to write, based on
> lat/lon data for cities (I am pretty sure I saw a database with lat/lon
> data for cities somewhere, but ... if it already exists, I don't have to
> write it)?

There aren't any geocoding modules in the Perl DateTime suite (why would
there be?), but there *are* plenty of geocoding Perl CPAN modules. Check out
the Geo::Coder::* modules, for example.

If you want to roll your own simple time zone aliases, check out
DateTime::TimeZone::Alias:


    http://search.cpan.org/dist/DateTime-TimeZone-Alias/

The simplest DIY solution is a lookup table using a hash.

If you want to do something more elaborate, there are oodles of
geocoding resources for programmers on the web:


    http://en.wikipedia.org/wiki/Geocoding
    http://askgeo.com/
    http://askgeo.com/database/TimeZone

    http://www.geonames.org/export/web-services.html#timezone
    http://stackoverflow.com/questions/262264/
    http://stackoverflow.com/questions/237023/
    http://stackoverflow.com/questions/55901/
    http://stackoverflow.com/questions/41504/


Jim Monty
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.