Convert country-state code to time zone in Java

前端 未结 1 1593
野趣味
野趣味 2021-01-07 06:08

Having country-state code as input, is it possible to get the timezone using Java? For example us-tx -> (GMT-6)

Tried using this answer, however this

相关标签:
1条回答
  • 2021-01-07 07:08

    This isn't possible - in any language. Many US states have more than one time zone, depending on which part of the state you are referring to:

    From Wikipedia:

    You can clearly see on this map, many states where the time zone boundary does not follow the state boundary.

    0 讨论(0)
提交回复
热议问题