javascript - Get UTC Offset from date with different timezone -


im struggling date issues , love help. want offset utc timezone name. getting date server in format: "july 11, 2016::11:09:43 idt" (time zone in case idt- can other timezone). want able offset idt (in case) utc. there way figure out?

thanks!
livnat:)

if examine list of time zone abbreviations , corresponding offsets, such the list on wikipedia or the list on timeanddate.com, may able find idt abbreviation israel daylight time, , equal utc+3. however, upon further examination you'll find there many abbreviations ambiguous. example:

  • cst of:

    • central standard time (utc-6)
    • china standard time (utc+8)
    • cuba standard time (utc-5)
  • bst of:

    • british summer time (utc+1)
    • bangladesh standard time (utc+6)
    • bougainville standard time (utc+11)

... , many others.

you'll find 2 lists mentioned not identical. that's because in general, time zone abbreviations convention, not standard.

therefore, if have abbreviation, , want cover time zones of world, cannot uniquely identify time zone.

that said, if can limit list set of predefined, non-conflicting abbreviations, work out mapping table on own. alternatively, if have additional information such country, can use information disambiguate.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -