Arizona TimeZone Day Light Saving

后端 未结 4 1014
悲哀的现实
悲哀的现实 2021-01-06 13:26

I am trying to get current time in specific time zones. I tried following code.

Calendar j = new GregorianCalendar(TimeZone.getTimeZone(\"US/Mountain\"));
j.         


        
4条回答
  •  渐次进展
    2021-01-06 14:14

    The zone information can be obtained directly for many major cities worldwide. This includes Phoenix, which has the zone identifier "America/Phoenix".

    You can find the list of available zone identifiers using the method TimeZone.getAvailableIDs() or by manually inspecting the contents of the JRE lib/zi directory.

    As other posters have noted, the "US/Arizona" zone information is distinct from "US/Mountain".

提交回复
热议问题