Welcome Guest, Not a member yet? Register   Sign In
GMT dropdown autoselect according to local GMT?
#1

[eluser]Tyler Diaz[/eluser]
If the topic title did not explain itself too clearly, what I want to do is: Take the date helper GMT dropdown and make it auto select the GMT that corresponds to what may seem as the default one. For example, my GMT is GMT-5. How could I make the dropdown be default selected at GMT-5?

I tried experimenting and searching but did not have much luck. Thanks in advance, Tyler Diaz.
#2

[eluser]steelaz[/eluser]
You need to use UM5 to select GMT-5:
Code:
timezone_menu('UM5');

Check timezone reference table here - http://ellislab.com/codeigniter/user-gui...elper.html
#3

[eluser]Tyler Diaz[/eluser]
I understood that part, I have read the date helper past of the guide extensively.

But how would I make it auto select according to the GMT the user has. A case scenario would be supposing you live in Texas, and I live in florida - Both different time zones. When you see the dropdown it is auto selected to the Texas GMT and when I see the dropdown it is auto selected to the florida GMT.
#4

[eluser]pistolPete[/eluser]
I guess you need to use javascript to detect the user's timezone.
Have a look at http://www.onlineaspect.com/2007/06/08/a...avascript/




Theme © iAndrew 2016 - Forum software by © MyBB