/libcore/luni/src/test/java/libcore/java/util/ |
D | OldTimeZoneTest.java | 92 TimeZone tz = TimeZone.getTimeZone("GMT-6"); in test_getDisplayName() local 93 assertEquals("GMT-06:00", tz.getDisplayName()); in test_getDisplayName() 94 tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayName() 95 assertEquals("Pacific Standard Time", tz.getDisplayName()); in test_getDisplayName() 99 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayNameLjava_util_Locale() local 100 assertEquals("Pacific Standard Time", tz.getDisplayName(Locale.US)); in test_getDisplayNameLjava_util_Locale() 101 assertEquals("heure normale du Pacifique nord-américain", tz.getDisplayName(Locale.FRANCE)); in test_getDisplayNameLjava_util_Locale() 106 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayNameZI() local 107 assertEquals("PST", tz.getDisplayName(false, TimeZone.SHORT)); in test_getDisplayNameZI() 108 assertEquals("Pacific Daylight Time", tz.getDisplayName(true, TimeZone.LONG)); in test_getDisplayNameZI() [all …]
|
D | TimeZoneTest.java | 73 TimeZone tz = TimeZone.getTimeZone("CET"); in testPreHistoricInDaylightTime() local 76 assertEquals(7200000L, tz.getOffset(firstTransitionTimeMillis)); in testPreHistoricInDaylightTime() 77 assertTrue(tz.inDaylightTime(new Date(firstTransitionTimeMillis))); in testPreHistoricInDaylightTime() 80 assertEquals(3600000L, tz.getOffset(beforeFirstTransitionTimeMillis)); in testPreHistoricInDaylightTime() 81 assertFalse(tz.inDaylightTime(new Date(beforeFirstTransitionTimeMillis))); in testPreHistoricInDaylightTime() 93 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in testPreHistoricInDaylightTime_old() local 94 TimeZone.setDefault(tz); in testPreHistoricInDaylightTime_old() 98 assertEquals(-28800000, tz.getOffset(date.getTime())); in testPreHistoricInDaylightTime_old() 99 assertFalse(tz.inDaylightTime(date)); in testPreHistoricInDaylightTime_old() 104 assertEquals(-28800000, tz.getOffset(date.getTime())); in testPreHistoricInDaylightTime_old() [all …]
|
D | CalendarTest.java | 51 TimeZone tz = TimeZone.getTimeZone("GMT+7"); in test_setTimeZone() local 52 cal.setTimeZone(tz); in test_setTimeZone()
|
/libcore/ojluni/src/test/java/util/TimeZone/ |
D | SimpleTimeZoneCloneRaceTest.java | 55 TimeZone tz = sharedTZ; in testSimpleTimeZone() 61 return (TimeZone) tz.clone(); in testSimpleTimeZone() 104 TimeZone tz = createSTZ(); 105 Calendar cal = Calendar.getInstance(tz, Locale.ROOT); 108 correctOffset = tz.getOffset(time); 124 TimeZone tz = tzSupplier.get(); in run() local 125 int offset = tz.getOffset(time); in run()
|
/libcore/ojluni/src/test/java/util/zip/ |
D | TestLocalTime.java | 51 TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); in main() local 54 testWithTZ(tz, ldt.withYear(1982)); in main() 55 testWithTZ(tz, ldt.withYear(2037)); in main() 56 testWithTZ(tz, ldt.withYear(2100)); in main() 57 testWithTZ(tz, ldt.withYear(2106)); in main() 89 static void testWithTZ(TimeZone tz, LocalDateTime ldt) throws Throwable { in testWithTZ() argument 90 TimeZone.setDefault(tz); in testWithTZ()
|
D | TestExtraTime.java | 61 TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); in main() local 73 tz, extra); in main() 80 tz, extra); in main() 87 tz, extra); in main() local 94 tz, extra); in main() 104 TimeZone tz, byte[] extra) throws Throwable { in test() argument 106 test0(mtime, null, null, tz, extra); // non-default tz in test() 110 test0(mtime, atime, null, tz, extra); in test() 111 test0(mtime, null, ctime, tz, extra); in test() 112 test0(mtime, atime, ctime, tz, extra); in test() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TimeZoneTest.java | 224 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getAvailableIDs_I_16947622() local 225 int rawOffset = tz.getRawOffset(); in test_getAvailableIDs_I_16947622() 243 TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); in test_getAvailableIDs_I() local 244 int rawoffset = tz.getRawOffset(); in test_getAvailableIDs_I() 281 TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); in test_hasSameRules_Ljava_util_TimeZone() local 282 int offset = tz.getRawOffset(); in test_hasSameRules_Ljava_util_TimeZone() 288 if (!(ids[i].equalsIgnoreCase(tz.getID()))) { in test_hasSameRules_Ljava_util_TimeZone() 290 assertTrue(tz.hasSameRules(sameZone)); in test_hasSameRules_Ljava_util_TimeZone() 297 assertFalse("should return false when parameter is null", tz in test_hasSameRules_Ljava_util_TimeZone()
|
D | DateTest.java | 458 TimeZone tz = TimeZone.getDefault(); in test_toString() local 465 TimeZone.setDefault(tz); in test_toString() 496 TimeZone tz = TimeZone.getDefault(); in test_toLocaleString() local 508 TimeZone.setDefault(tz); in test_toLocaleString()
|
D | SimpleTimeZoneTest.java | 262 TimeZone tz = TimeZone.getTimeZone("EST"); in test_equalsLjava_lang_Object() local 263 st1 = new SimpleTimeZone(tz.getRawOffset(), "EST"); in test_equalsLjava_lang_Object() 402 TimeZone tz = TimeZone.getTimeZone("EST"); in test_inDaylightTimeLjava_util_Date() local 403 SimpleTimeZone zone = new SimpleTimeZone(tz.getRawOffset(), "EST", in test_inDaylightTimeLjava_util_Date()
|
D | FormatterTest.java | 4178 for (String tz : TimeZone.getAvailableIDs()) { in test_DaylightTime() 4179 if (tz.equals("America/Los_Angeles")) { in test_DaylightTime() 4180 c1.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4181 c2.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4184 if (tz.equals("America/Panama")) { in test_DaylightTime() 4185 c1.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4186 c2.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime()
|
D | GregorianCalendarTest.java | 344 TimeZone tz = TimeZone.getTimeZone(ids[i]); in test_getActualMaximumI() local 345 gc.setTimeZone(tz); in test_getActualMaximumI()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | TimeZoneNames.java | 79 TimeZone tz = null; in addOffsetStrings() local 84 if (tz == null) { in addOffsetStrings() 85 tz = TimeZone.getTimeZone(result[i][0]); in addOffsetStrings() 87 int offsetMillis = tz.getRawOffset(); in addOffsetStrings() 89 offsetMillis += tz.getDSTSavings(); in addOffsetStrings()
|
/libcore/luni/src/test/java/libcore/libcore/util/ |
D | ZoneInfoTest.java | 73 TimeZone tz = TimeZone.getTimeZone(tzId); in testUseDaylightTime_consistency() local 75 tz.useDaylightTime(), tz.getDSTSavings() != 0); in testUseDaylightTime_consistency()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestZoneTextPrinterParser.java | 119 TimeZone tz = TimeZone.getTimeZone(zid); in test_printText() local 121 if (tz.getID().equals("GMT")) { in test_printText() 124 boolean isDST = tz.inDaylightTime(new Date(zdt.toInstant().toEpochMilli())); in test_printText() 125 printText(locale, zdt, TextStyle.FULL, tz, in test_printText() 126 tz.getDisplayName(isDST, TimeZone.LONG, locale)); in test_printText() 127 printText(locale, zdt, TextStyle.SHORT, tz, in test_printText() 128 tz.getDisplayName(isDST, TimeZone.SHORT, locale)); in test_printText()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 189 TimeZone tz = AMERICA_LOS_ANGELES; in testFiveCount_Z() local 190 assertEquals("-0800", formatDate(Locale.ENGLISH, "Z", tz)); in testFiveCount_Z() 191 assertEquals("-0800", formatDate(Locale.ENGLISH, "ZZ", tz)); in testFiveCount_Z() 192 assertEquals("-0800", formatDate(Locale.ENGLISH, "ZZZ", tz)); in testFiveCount_Z() 193 assertEquals("GMT-08:00", formatDate(Locale.ENGLISH, "ZZZZ", tz)); in testFiveCount_Z() 194 assertEquals("-08:00", formatDate(Locale.ENGLISH, "ZZZZZ", tz)); in testFiveCount_Z() 231 private String formatDate(Locale l, String fmt, TimeZone tz) { in formatDate() argument 233 dateFormat.setTimeZone(tz); in formatDate() 254 private static Calendar parseDate(Locale l, String fmt, String value, TimeZone tz) { in parseDate() argument 256 sdf.setTimeZone(tz); in parseDate() [all …]
|
D | DateFormatSymbolsTest.java | 176 private static String formattedStandardTimeOffset(TimeZone tz) { in formattedStandardTimeOffset() argument 177 return formattedOffset(tz.getRawOffset()); in formattedStandardTimeOffset() 180 private static String formattedDstOffset(TimeZone tz) { in formattedDstOffset() argument 181 return formattedOffset(tz.getRawOffset() + tz.getDSTSavings()); in formattedDstOffset()
|
D | OldDateFormatTest.java | 137 TimeZone tz = format.getTimeZone(); in test_getTimeZone() local 144 assertTrue("Incorrect time zone", tz.equals(format.getCalendar() in test_getTimeZone() 483 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_setTimeZoneLjava_util_TimeZone() local 484 format.setTimeZone(tz); in test_setTimeZoneLjava_util_TimeZone() 485 assertTrue("TimeZone is set incorrectly", tz.equals(format in test_setTimeZoneLjava_util_TimeZone()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Date.java | 1229 TimeZone tz = TimeZone.getDefaultRef(); in normalize() local 1230 if (tz != cdate.getZone()) { in normalize() 1231 cdate.setZone(tz); in normalize() 1247 TimeZone tz = date.getZone(); in normalize() local 1258 if (tz == null) { in normalize() 1259 tz = TimeZone.getTimeZone("GMT"); in normalize() 1261 GregorianCalendar gc = new GregorianCalendar(tz); in normalize() 1267 date = (BaseCalendar.Date) cal.getCalendarDate(fastTime, tz); in normalize() 1273 date = (BaseCalendar.Date) cal.newCalendarDate(tz); in normalize() 1283 date = (BaseCalendar.Date) ncal.newCalendarDate(tz); in normalize()
|
D | Calendar.java | 3689 TimeZone tz = TimeZone.getTimeZone(id); in readObject() local 3690 if (tz != null && tz.hasSameRules(zone) && tz.getID().equals(id)) { in readObject() 3691 zone = tz; in readObject()
|
D | GregorianCalendar.java | 2304 TimeZone tz = getZone(); in computeFields() local 2309 if (tz instanceof ZoneInfo) { in computeFields() 2313 ZoneInfo zoneInfo = (ZoneInfo) tz; in computeFields() 2317 zoneOffset = tz.getOffset(time); in computeFields() 2318 zoneOffsets[0] = tz.getRawOffset(); in computeFields()
|
D | JapaneseImperialCalendar.java | 1559 TimeZone tz = getZone(); 1567 if (tz instanceof libcore.util.ZoneInfo) { 1568 zoneOffset = ((libcore.util.ZoneInfo)tz).getOffsetsByUtcTime(time, zoneOffsets); 1571 zoneOffset = tz.getOffset(time); 1572 zoneOffsets[0] = tz.getRawOffset();
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | Support_SimpleDateFormat.java | 49 TimeZone tz = TimeZone.getTimeZone("EST"); in t_format_with_FieldPosition() local 50 Calendar cal = new GregorianCalendar(tz); in t_format_with_FieldPosition() 55 format.setTimeZone(tz); in t_format_with_FieldPosition() 133 TimeZone tz = TimeZone.getTimeZone("EST"); in t_formatToCharacterIterator() local 134 Calendar cal = new GregorianCalendar(tz); in t_formatToCharacterIterator() 139 format.setTimeZone(tz); in t_formatToCharacterIterator()
|
/libcore/ojluni/src/main/java/java/text/ |
D | SimpleDateFormat.java | 1479 TimeZone tz = calendar.getTimeZone(); in subFormat() local 1487 formatData.getZoneStringsWrapper(), tz.getID(), daylight, tzstyle); in subFormat() 1499 String canonicalID = android.icu.util.TimeZone.getCanonicalID(tz.getID()); in subFormat() 1764 final TimeZone tz = getTimeZone(); in parse() local 1768 setTimeZone(tz); in parse() 2126 TimeZone tz = null; in subParseZoneStringFromSymbols() local 2137 tz = TimeZone.getTimeZone(zoneNames[0]); in subParseZoneStringFromSymbols() 2140 if (tz == null) { in subParseZoneStringFromSymbols() 2148 tz = TimeZone.getTimeZone(zoneNames[0]); in subParseZoneStringFromSymbols() 2153 if (tz == null) { in subParseZoneStringFromSymbols() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 116 TimeZone tz = TimeZone.getTimeZone(zdt.getZone()); in test() local 119 cal = Calendar.getJapaneseImperialInstance(tz, calLocale); in test() 121 cal = Calendar.getInstance(tz, calLocale); in test()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerOutputStream.java | 493 TimeZone tz = TimeZone.getTimeZone("GMT"); in putTime() local 504 sdf.setTimeZone(tz); in putTime()
|