Getting a user's timezone

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HiddenS3crets
Forum Contributor
Posts: 119
Joined: Fri Apr 22, 2005 12:23 pm
Location: USA

Getting a user's timezone

Post by HiddenS3crets »

Is there a way to get the timezone for a user?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Ask them and/or use Javascript to ask their computer.
invisible
Forum Newbie
Posts: 2
Joined: Mon May 14, 2007 9:00 pm

Post by invisible »

If you had the knowledge and resources you could probably collect their ip, then trace where it is coming from and then run that location against all of the timezones to place them in the correct timezone.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

invisible wrote:If you had the knowledge and resources you could probably collect their ip, then trace where it is coming from and then run that location against all of the timezones to place them in the correct timezone.
IP location checking is by no means accurate, so the user should be able to choose if they wish. I would simply use Javascript to give a best guess.
Post Reply