Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.2k views
in Technique[技术] by (71.8m points)

php - IP to location + local time?

Currently I've been using http://www.geoiptool.com/ but I can't get the local time. I don't know what to do to get the local time.

Can someone help me out, to display location + local time? I have a mail app and I try to display IP in location + local time.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Geobytes will give you the offset:

http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress=64.34.119.12

Or in an XML format (you might need to view source to see it):

http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress=64.34.119.12

This will give you the offset, just add/subtract the offset to GMT/UTC.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...