Page 1 of 1
To track time (GMT standards) given lattitude & longitud
Posted: Wed Jun 13, 2007 5:11 am
by dream2rule
Hello All,
I am a newbie in PHP and wanna know how to track the time (GMT standards) when lattitude and longitude locations are given.
It would be helpful if anyone could provide me with the code for the same!
Help Needed Urgently.
Regards
Posted: Wed Jun 13, 2007 7:03 am
by feyd
You will need the time zone lines in latitude and longitude as well. After that, it's a bunch of comparisons.
Posted: Wed Jun 13, 2007 6:28 pm
by califdon
feyd wrote:You will need the time zone lines in latitude and longitude as well. After that, it's a bunch of comparisons.
I think it's even worse than that. Some time zones are irregular shapes and the only way I know to really determine the time zone from Lat/Long is to use GIS. Fortunately there is some GIS support in MySQL, but it will be a really messy operation. Take a look at
http://dev.mysql.com/tech-resources/art ... mysql.html
Posted: Wed Jun 13, 2007 8:47 pm
by feyd
califdon wrote:I think it's even worse than that. Some time zones are irregular shapes and the only way I know to really determine the time zone from Lat/Long is to use GIS. Fortunately there is some GIS support in MySQL, but it will be a really messy operation. Take a look at
http://dev.mysql.com/tech-resources/art ... mysql.html
Right. I was actually referring to the irregular shapes in "it's a bunch of comparisons" .. although vaguely.

Posted: Wed Jun 13, 2007 9:26 pm
by superdezign
feyd wrote: .. although vaguely.

Vagueness is always a good way to avoid being wrong.

Posted: Wed Jun 13, 2007 9:37 pm
by suyeic
I think you just need the value of longitude to decide which time zone you located, it's not a very complex work, I think.
GMT and GeoIP
Posted: Thu Jun 14, 2007 2:40 am
by Gente
There are some databases with GMT of some cities (about 500 and 1000).
Also you can find GeoIP tables with city, longitude. So you can find the closest city by latitude that presented in GMT table.
This way you cat find out GMT with a high probability.
Posted: Thu Jun 14, 2007 3:52 am
by dream2rule