Extracting a time zone from a latitude longitude
Extracting a time zone from a latitude longitude
am 21.11.2009 18:25:16 von Haig Davis
--001636e1e9f3333ea50478e4e063
Content-Type: text/plain; charset=ISO-8859-1
Good Morning all,
Having a look at the time zone functions in PHP you can enter a time zone
city and get it's lat long. Does anybody know how you can run the function
in reverse (or know of a similar function) i.e. get the time zone city from
the geographic coordinates. Google maps was a thought but the functions are
only for use in google maps which rules out my use for them.
Have a great weekend.
Cheers
--001636e1e9f3333ea50478e4e063--
Re: Extracting a time zone from a latitude longitude
am 21.11.2009 18:51:14 von Phpster
This is a simple math problem. Create am array with a start and end
longitude for that timezone and run a comapre from your lay/long co-
ords to see where it falls.
Bastien
Sent from my iPod
On Nov 21, 2009, at 12:25 PM, Haig Davis wrote:
> Good Morning all,
>
> Having a look at the time zone functions in PHP you can enter a time
> zone
> city and get it's lat long. Does anybody know how you can run the
> function
> in reverse (or know of a similar function) i.e. get the time zone
> city from
> the geographic coordinates. Google maps was a thought but the
> functions are
> only for use in google maps which rules out my use for them.
>
> Have a great weekend.
>
> Cheers
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Extracting a time zone from a latitude longitude
am 21.11.2009 18:56:48 von Stut
On 21 Nov 2009, at 17:51, Phpster wrote:
> This is a simple math problem. Create am array with a start and end =
longitude for that timezone and run a comapre from your lay/long co-ords =
to see where it falls.
It's not that simple because timezones boundaries don't run in straight =
lines from pole to pole.
I Googled and got this among several others...
=
http://stackoverflow.com/questions/41504/timezone-lookup-fro m-latitude-lon=
gitude
-Stuart
--=20
http://3ft9.com/
> On Nov 21, 2009, at 12:25 PM, Haig Davis wrote:
>=20
>> Good Morning all,
>>=20
>> Having a look at the time zone functions in PHP you can enter a time =
zone
>> city and get it's lat long. Does anybody know how you can run the =
function
>> in reverse (or know of a similar function) i.e. get the time zone =
city from
>> the geographic coordinates. Google maps was a thought but the =
functions are
>> only for use in google maps which rules out my use for them.
>>=20
>> Have a great weekend.
>>=20
>> Cheers
>=20
> --=20
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>=20
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Extracting a time zone from a latitude longitude
am 21.11.2009 22:47:03 von Nathan Rixham
Haig Davis wrote:
> Good Morning all,
>
> Having a look at the time zone functions in PHP you can enter a time zone
> city and get it's lat long. Does anybody know how you can run the function
> in reverse (or know of a similar function) i.e. get the time zone city from
> the geographic coordinates. Google maps was a thought but the functions are
> only for use in google maps which rules out my use for them.
>
> Have a great weekend.
>
> Cheers
>
http://www.geonames.org/export/web-services.html#timezone
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Extracting a time zone from a latitude longitude
am 21.11.2009 23:46:20 von Clancy
On Sat, 21 Nov 2009 09:25:16 -0800, level510@gmail.com (Haig Davis) wrote:
>Good Morning all,
>
>Having a look at the time zone functions in PHP you can enter a time zone
>city and get it's lat long. Does anybody know how you can run the function
>in reverse (or know of a similar function) i.e. get the time zone city from
>the geographic coordinates. Google maps was a thought but the functions are
>only for use in google maps which rules out my use for them.
Don't know what you mean by "Time Zone City". IF the world were organised scientifically
the time zone for a given location would be given by
Time zone = GMT + (int)Long/15
But, as Stuart has pointed out, it isn't. Melbourne, Sydney, Brisbane, Port Moresby,
Sakhalin & Okhosh are all on GMT +10, but treat summertime in at least two and probably
three different ways. Also Okhosh, Tokyo, and Adelaide all have a longitude of
approximately 140°, but are on GMT +10, +9, and +9.5.
If you really want to know the time zone for an arbitrary latitude and longitude, I doubt
if you have any alternative to looking it up in an atlas.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php