Timezone Abbreviations

前端 未结 7 1528
情话喂你
情话喂你 2020-11-28 08:07

TimeZoneInfo does not provide abbreviation or a short name for a given Timezone. The only good way to do it is to have a dictionary that will map abbreviations

7条回答
  •  隐瞒了意图╮
    2020-11-28 08:26

    I had a similar issue, but didn't want to use a 3rd party library (as most of these answers suggest). If you only want to support .Net's timezone names, and decide to use a lookup table, take a look at my answer over here, which leans on PHP to help generate a list of abbreviations. You can adapt the snippet there and the table to suit your needs.

提交回复
热议问题