Results 1 to 2 of 2

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

  1. #1

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Question 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 aspropDownList 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?

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Matching Local (javascript client) timezone name to a TimeZoneInfo DropDownList i

    Well the standard is the ISO 8601 format.
    From there onward it's up to you.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width