本文整理匯總了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();
}