Jump to content

Event Time according Local Visitor time.


hitk

Recommended Posts

I need to know what should I do to show event time (stored in mysql) according viewer's local time.

 

I have stored time in two format (one simple 12:30; and another in timestamp format). The timings are of future and stored as GMT. 

 

Now, I would like to show time of event according to the viewer's location. Suppose Visitor is from India than Time should be in IST (GMT + 05:30 Hours). How its possible ?

Link to comment
Share on other sites

Ok. Seems to be problem similar to http://www.webmasterworld.com/php/3398104.htm

 

But I have no idea how to fetch data from mysql and convert it. Moreover, something javascript was use. No idea whether it work in my custom script.

 

Edit :

 

I might be wrong, what I am telling. It should be like this - http://www.cricinfo.com/england-v-australia-2010/content/series/426337.html?template=fixtures

 

What I see is like below. When you see the url, it will time according to your ip (or zone no idea)

 

75715530.png

Link to comment
Share on other sites

If you can't use IP geolocation, the visitor would need to select his time zone, and have that info stored in a cookie. Otherwise, if you have your users register, they can set it in a preferences setting and store it in the database with the user's record. That can then be referenced whenever time info is needed.

Link to comment
Share on other sites

If you can't use IP geolocation, the visitor would need to select his time zone, and have that info stored in a cookie. Otherwise, if you have your users register, they can set it in a preferences setting and store it in the database with the user's record. That can then be referenced whenever time info is needed.

 

I dont have registration. I only provide data from mysql.

 

I think something do with - http://www.maxmind.com/app/free

Link to comment
Share on other sites

Yes I did. You don't need registration to ask someone a question. Just display the timezone info next to the time and default it to the event's local time zone. Then have a drop down that allows people to select another timezone, and update the times accordingly.

Link to comment
Share on other sites

Yes I did. You don't need registration to ask someone a question. Just display the timezone info next to the time and default it to the event's local time zone. Then have a drop down that allows people to select another timezone, and update the times accordingly.

 

Is it not possible to detect timezone and display according. ?

Link to comment
Share on other sites

Yes I did. You don't need registration to ask someone a question. Just display the timezone info next to the time and default it to the event's local time zone. Then have a drop down that allows people to select another timezone, and update the times accordingly.

 

Is it not possible to detect timezone and display according. ?

 

Yes, but you still need to provide a way for the use to select the time zone they are actually in, when the geolocation detection is not correct, which appears to be about 21% of the time. If more than 1 out of every 5 visitors are not detected correctly, what's the point of doing it at all?

Link to comment
Share on other sites

Yes I did. You don't need registration to ask someone a question. Just display the timezone info next to the time and default it to the event's local time zone. Then have a drop down that allows people to select another timezone, and update the times accordingly.

 

Is it not possible to detect timezone and display according. ?

 

You could check the date/time info using Javascript and then change the times.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.