NYCPHP Meetup

NYPHP.org

[nycphp-talk] Time zone based on country/state/city

Jake McGraw jmcgraw1 at gmail.com
Tue Aug 25 17:03:39 EDT 2009


On Tue, Aug 25, 2009 at 3:07 PM, Nelly Yusupova<nelly at cgim.com> wrote:
> Hello Everyone,
>
> Is there a way to figure out a time zone based on country/state/city.  I
> searched the web and could not find any resources.

You have got two problems here:

Most TZ databases are going to be LatLon specific, so, you'll have to
convert an address (City, State, Country) to geolocation
(latitude/longitude), Google and Yahoo have services for that.

Then you'll have to convert the Lat Long to a timezone, using this:

www.geonames.org/export

http://www.geonames.org/export/web-services.html#timezone

Hope that helps!

- jake

>
> Thank you in advance.
>
> Sincerely,
> Nelly Yusupova
> Webgrrls.com
> nelly at cgim.com
> 917 603-9226 (phone)
> URL: http://www.webgrrls.com
> Blog: http://www.webgrrls.com/blog/
> Twitter: http://twitter.com/DigitalWoman
>
>
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>



More information about the talk mailing list