/libcore/luni/src/test/java/libcore/java/util/ |
D | OldTimeZoneTest.java | 85 TimeZone tz = TimeZone.getTimeZone("GMT-6"); in test_getDisplayName() local 86 assertEquals("GMT-06:00", tz.getDisplayName()); in test_getDisplayName() 87 tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayName() 88 assertEquals("Pacific Standard Time", tz.getDisplayName()); in test_getDisplayName() 92 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayNameLjava_util_Locale() local 93 assertEquals("Pacific Standard Time", tz.getDisplayName(Locale.US)); in test_getDisplayNameLjava_util_Locale() 94 assertEquals("heure normale du Pacifique nord-américain", tz.getDisplayName(Locale.FRANCE)); in test_getDisplayNameLjava_util_Locale() 99 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayNameZI() local 100 assertEquals("PST", tz.getDisplayName(false, TimeZone.SHORT)); in test_getDisplayNameZI() 101 assertEquals("Pacific Daylight Time", tz.getDisplayName(true, TimeZone.LONG)); in test_getDisplayNameZI() [all …]
|
D | TimeZoneTest.java | 64 TimeZone tz = TimeZone.getTimeZone("CET"); in testPreHistoricInDaylightTime() local 67 assertEquals(7200000L, tz.getOffset(firstTransitionTimeMillis)); in testPreHistoricInDaylightTime() 68 assertTrue(tz.inDaylightTime(new Date(firstTransitionTimeMillis))); in testPreHistoricInDaylightTime() 71 assertEquals(3600000L, tz.getOffset(beforeFirstTransitionTimeMillis)); in testPreHistoricInDaylightTime() 72 assertFalse(tz.inDaylightTime(new Date(beforeFirstTransitionTimeMillis))); in testPreHistoricInDaylightTime() 84 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in testPreHistoricInDaylightTime_old() local 85 TimeZone.setDefault(tz); in testPreHistoricInDaylightTime_old() 89 assertEquals(-28800000, tz.getOffset(date.getTime())); in testPreHistoricInDaylightTime_old() 90 assertFalse(tz.inDaylightTime(date)); in testPreHistoricInDaylightTime_old() 95 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/luni/src/test/java/libcore/libcore/icu/ |
D | DateIntervalFormatTest.java | 39 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_formatDateInterval() local 41 Calendar c = Calendar.getInstance(tz, ULocale.US); in test_formatDateInterval() 65 …assertEquals("Monday", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SHOW_WEEKDAY… in test_formatDateInterval() 66 …assertEquals("January 19", formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + H… in test_formatDateInterval() 67 assertEquals("3:30 AM", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_SHOW_TIME)); in test_formatDateInterval() 68 …assertEquals("January 19, 2009", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SH… in test_formatDateInterval() 69 …assertEquals("January 19", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_NO_YEAR)… in test_formatDateInterval() 70 …assertEquals("January", formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + HOUR… in test_formatDateInterval() 71 …assertEquals("3:30 AM", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_12HOUR | FORMAT_SH… in test_formatDateInterval() 72 …assertEquals("03:30", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_24HOUR | FORMAT_SHOW… in test_formatDateInterval() [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 | 456 TimeZone tz = TimeZone.getDefault(); in test_toString() local 463 TimeZone.setDefault(tz); in test_toString() 491 TimeZone tz = TimeZone.getDefault(); in test_toLocaleString() local 503 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 | 4182 for (String tz : TimeZone.getAvailableIDs()) { in test_DaylightTime() 4183 if (tz.equals("America/Los_Angeles")) { in test_DaylightTime() 4184 c1.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4185 c2.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4188 if (tz.equals("America/Panama")) { in test_DaylightTime() 4189 c1.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4190 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()
|
D | DateIntervalFormat.java | 45 TimeZone tz = (olsonId != null) ? TimeZone.getTimeZone(olsonId) : TimeZone.getDefault(); in formatDateRange() local 46 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in formatDateRange()
|
D | DateUtilsBridge.java | 53 /* package */ static android.icu.util.TimeZone icuTimeZone(java.util.TimeZone tz) { in icuTimeZone() argument 54 android.icu.util.TimeZone icuTimeZone = TimeZone.getTimeZone(tz.getID()); in icuTimeZone()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestZoneTextPrinterParser.java | 98 TimeZone tz = TimeZone.getTimeZone(zid); in test_printText() local 100 if (tz.getID().equals("GMT")) { in test_printText() 103 boolean isDST = tz.inDaylightTime(new Date(zdt.toInstant().toEpochMilli())); in test_printText() 104 printText(locale, zdt, TextStyle.FULL, tz, in test_printText() 105 tz.getDisplayName(isDST, TimeZone.LONG, locale)); in test_printText() 106 printText(locale, zdt, TextStyle.SHORT, tz, in test_printText() 107 tz.getDisplayName(isDST, TimeZone.SHORT, locale)); in test_printText()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 188 TimeZone tz = AMERICA_LOS_ANGELES; in testFiveCount_Z() local 189 assertEquals("-0800", formatDate(Locale.ENGLISH, "Z", tz)); in testFiveCount_Z() 190 assertEquals("-0800", formatDate(Locale.ENGLISH, "ZZ", tz)); in testFiveCount_Z() 191 assertEquals("-0800", formatDate(Locale.ENGLISH, "ZZZ", tz)); in testFiveCount_Z() 192 assertEquals("GMT-08:00", formatDate(Locale.ENGLISH, "ZZZZ", tz)); in testFiveCount_Z() 193 assertEquals("-08:00", formatDate(Locale.ENGLISH, "ZZZZZ", tz)); in testFiveCount_Z() 230 private String formatDate(Locale l, String fmt, TimeZone tz) { in formatDate() argument 232 dateFormat.setTimeZone(tz); in formatDate() 253 private static Calendar parseDate(Locale l, String fmt, String value, TimeZone tz) { in parseDate() argument 255 sdf.setTimeZone(tz); in parseDate() [all …]
|
D | OldDateFormatTest.java | 132 TimeZone tz = format.getTimeZone(); in test_getTimeZone() local 139 assertTrue("Incorrect time zone", tz.equals(format.getCalendar() in test_getTimeZone() 478 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_setTimeZoneLjava_util_TimeZone() local 479 format.setTimeZone(tz); in test_setTimeZoneLjava_util_TimeZone() 480 assertTrue("TimeZone is set incorrectly", tz.equals(format in test_setTimeZoneLjava_util_TimeZone()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Date.java | 1227 TimeZone tz = TimeZone.getDefaultRef(); in normalize() local 1228 if (tz != cdate.getZone()) { in normalize() 1229 cdate.setZone(tz); in normalize() 1245 TimeZone tz = date.getZone(); in normalize() local 1256 if (tz == null) { in normalize() 1257 tz = TimeZone.getTimeZone("GMT"); in normalize() 1259 GregorianCalendar gc = new GregorianCalendar(tz); in normalize() 1265 date = (BaseCalendar.Date) cal.getCalendarDate(fastTime, tz); in normalize() 1271 date = (BaseCalendar.Date) cal.newCalendarDate(tz); in normalize() 1281 date = (BaseCalendar.Date) ncal.newCalendarDate(tz); in normalize()
|
D | Calendar.java | 3577 TimeZone tz = TimeZone.getTimeZone(id); in readObject() local 3578 if (tz != null && tz.hasSameRules(zone) && tz.getID().equals(id)) { in readObject() 3579 zone = tz; in readObject()
|
D | GregorianCalendar.java | 2343 TimeZone tz = getZone(); in computeFields() local 2348 if (tz instanceof ZoneInfo) { in computeFields() 2352 ZoneInfo zoneInfo = (ZoneInfo) tz; in computeFields() 2356 zoneOffset = tz.getOffset(time); in computeFields() 2357 zoneOffsets[0] = tz.getRawOffset(); in computeFields()
|
D | JapaneseImperialCalendar.java | 1594 TimeZone tz = getZone(); in computeFields() local 1602 if (tz instanceof libcore.util.ZoneInfo) { in computeFields() 1603 zoneOffset = ((libcore.util.ZoneInfo)tz).getOffsetsByUtcTime(time, zoneOffsets); in computeFields() 1606 zoneOffset = tz.getOffset(time); in computeFields() 1607 zoneOffsets[0] = tz.getRawOffset(); in computeFields()
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | IcuZoneRulesProvider.java | 109 BasicTimeZone tz = (BasicTimeZone) timeZone; in generateZoneRules() local 110 TimeZoneRule[] rules = tz.getTimeZoneRules(); in generateZoneRules() 126 TimeZoneTransition transition = tz.getNextTransition(Long.MIN_VALUE, false); in generateZoneRules() 171 transition = tz.getNextTransition(transition.getTime(), false); in generateZoneRules() 182 transition = tz.getNextTransition(transition.getTime(), false); in generateZoneRules()
|
/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 | 1448 TimeZone tz = calendar.getTimeZone(); in subFormat() local 1456 formatData.getZoneStringsWrapper(), tz.getID(), daylight, tzstyle); in subFormat() 1468 String canonicalID = android.icu.util.TimeZone.getCanonicalID(tz.getID()); in subFormat() 1726 final TimeZone tz = getTimeZone(); in parse() local 1730 setTimeZone(tz); in parse() 2107 TimeZone tz = null; in subParseZoneStringFromSymbols() local 2118 tz = TimeZone.getTimeZone(zoneNames[0]); in subParseZoneStringFromSymbols() 2121 if (tz == null) { in subParseZoneStringFromSymbols() 2129 tz = TimeZone.getTimeZone(zoneNames[0]); in subParseZoneStringFromSymbols() 2134 if (tz == null) { in subParseZoneStringFromSymbols() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 111 TimeZone tz = TimeZone.getTimeZone(zdt.getZone()); in test() local 114 cal = Calendar.getJapaneseImperialInstance(tz, calLocale); in test() 116 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()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeFormatterBuilder.java | 3709 TimeZone tz = TimeZone.getTimeZone(id); in getDisplayName() local 3712 tz.getRawOffset()); in getDisplayName() 3715 tz.getRawOffset() + tz.getDSTSavings()); in getDisplayName()
|