Quantcast
Viewing all articles
Browse latest Browse all 15728

Matching Local (javascript client) timezone name to a TimeZoneInfo DropDownList item

First, I should mention that this is about interacting between client side javascript and server side asp.net.
I'm able to find some information about the client timezone in javascript. I have an asp:DropDownList that i load on page_load with TimeZoneInfo.GetSystemTimeZones' DisplayNames or alternatively IDs.
What I'm hoping to do is change the selectedindex from javascript, to the users current location.
But, they aren't identical text. For example...

javascript: Eastern European Standard Time
TimeZone.ID: E. Europe Standard Time

javascript: HH:mm:dd GMT-0400 (Atlantic Standard Time)
TimeZoneInfo.DisplayName: (UTC-04:00) Atlantic Time (Canada)

As you can see, there are differences.
Any suggestions on how I can make a most probable location matcher in javascript, using these incompatible identifiers?

Viewing all articles
Browse latest Browse all 15728

Trending Articles