本文整理汇总了Java中java.time.ZoneId.SHORT_IDS属性的典型用法代码示例。如果您正苦于以下问题:Java ZoneId.SHORT_IDS属性的具体用法?Java ZoneId.SHORT_IDS怎么用?Java ZoneId.SHORT_IDS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.time.ZoneId
的用法示例。
在下文中一共展示了ZoneId.SHORT_IDS属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test_constant_OLD_IDS_POST_2005
public void test_constant_OLD_IDS_POST_2005() {
Map<String, String> ids = ZoneId.SHORT_IDS;
assertEquals(ids.get("EST"), "-05:00");
assertEquals(ids.get("MST"), "-07:00");
assertEquals(ids.get("HST"), "-10:00");
assertEquals(ids.get("ACT"), "Australia/Darwin");
assertEquals(ids.get("AET"), "Australia/Sydney");
assertEquals(ids.get("AGT"), "America/Argentina/Buenos_Aires");
assertEquals(ids.get("ART"), "Africa/Cairo");
assertEquals(ids.get("AST"), "America/Anchorage");
assertEquals(ids.get("BET"), "America/Sao_Paulo");
assertEquals(ids.get("BST"), "Asia/Dhaka");
assertEquals(ids.get("CAT"), "Africa/Harare");
assertEquals(ids.get("CNT"), "America/St_Johns");
assertEquals(ids.get("CST"), "America/Chicago");
assertEquals(ids.get("CTT"), "Asia/Shanghai");
assertEquals(ids.get("EAT"), "Africa/Addis_Ababa");
assertEquals(ids.get("ECT"), "Europe/Paris");
assertEquals(ids.get("IET"), "America/Indiana/Indianapolis");
assertEquals(ids.get("IST"), "Asia/Kolkata");
assertEquals(ids.get("JST"), "Asia/Tokyo");
assertEquals(ids.get("MIT"), "Pacific/Apia");
assertEquals(ids.get("NET"), "Asia/Yerevan");
assertEquals(ids.get("NST"), "Pacific/Auckland");
assertEquals(ids.get("PLT"), "Asia/Karachi");
assertEquals(ids.get("PNT"), "America/Phoenix");
assertEquals(ids.get("PRT"), "America/Puerto_Rico");
assertEquals(ids.get("PST"), "America/Los_Angeles");
assertEquals(ids.get("SST"), "Pacific/Guadalcanal");
assertEquals(ids.get("VST"), "Asia/Ho_Chi_Minh");
}
示例2: test_constant_OLD_IDS_POST_2005_immutable
@Test(expectedExceptions=UnsupportedOperationException.class)
public void test_constant_OLD_IDS_POST_2005_immutable() {
Map<String, String> ids = ZoneId.SHORT_IDS;
ids.clear();
}