0

Possible Duplicate:
Timezone from geolocation

I have a website where people can check in basically. I tack the checkins by the date and time they check in. Well I save the date/time in UTC format.

Is their a way to tell what timezone someone is in by where they access the site? I want to somewhat default to a timezone. When a user creates a profile they can set the timezone.

I am using Visual Studio 2008 with VB.Net.

0

1 Answer 1

2

I'd suggest just getting the Time/Date from their browser and then comparing that to GMT. You can even use getTimezoneOffset(), it's built into the Date() object. Here are the DOCS
If the difference is 180, you know that they are three time zones away from GMT. Most people who travel have phones that will automatically adjust themselves to whatever time zone they are in. I'm pretty sure that their current time zone is based on the nearest cell tower. So if that's close enough for you, then you don't have to worry about getting their GPS location and all the security issues that go along with that.

Not the answer you're looking for? Browse other questions tagged or ask your own question.