LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: (Randal L. Schwartz) Date: Mon May 25 22:44:55 2009 Subject: Re: Auto detect timezone
>>>>> "Jayesh" == Jayesh Thakrar <j_thakrar@yahoo.com> writes: Jayesh> There's a webservice that you can invoke. See - Jayesh> http://www.xmethods.net/ve2/ViewListing.po?key=uuid:6F25C11C-7087-73ED-20B8-71AF6DC69E42 Jayesh> And you can use SOAP:Lite to query the web service with minimal effort. Ugh. If "SOAP" is part of your answer, you asked the wrong question. See Geo::GeoNames in the CPAN: use Geo::GeoNames; my $result = Geo::GeoNames->new->search(q => 'Portland, Oregon', maxRows => 1, style => 'FULL'); print $result->[0]{timezone}{content}, "\n"; ==> America/Los_Angeles As I would expect. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
| Navigate in group perl.beginners.cgi at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |