/libcore/luni/src/test/java/libcore/java/util/ |
D | OldTimeZoneTest.java | 86 TimeZone tz = TimeZone.getTimeZone("GMT-6"); in test_getDisplayName() local 87 assertEquals("GMT-06:00", tz.getDisplayName()); in test_getDisplayName() 88 tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayName() 89 assertEquals("Pacific Standard Time", tz.getDisplayName()); in test_getDisplayName() 93 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayNameLjava_util_Locale() local 94 assertEquals("Pacific Standard Time", tz.getDisplayName(Locale.US)); in test_getDisplayNameLjava_util_Locale() 95 assertEquals("heure normale du Pacifique nord-américain", tz.getDisplayName(Locale.FRANCE)); in test_getDisplayNameLjava_util_Locale() 100 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayNameZI() local 101 assertEquals("PST", tz.getDisplayName(false, TimeZone.SHORT)); in test_getDisplayNameZI() 102 assertEquals("Pacific Daylight Time", tz.getDisplayName(true, TimeZone.LONG)); in test_getDisplayNameZI() [all …]
|
D | TimeZoneTest.java | 61 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in testPreHistoricInDaylightTime() local 62 TimeZone.setDefault(tz); in testPreHistoricInDaylightTime() 66 assertEquals(-28800000, tz.getOffset(date.getTime())); in testPreHistoricInDaylightTime() 67 assertFalse(tz.inDaylightTime(date)); in testPreHistoricInDaylightTime() 72 assertEquals(-28800000, tz.getOffset(date.getTime())); in testPreHistoricInDaylightTime() 73 assertFalse(tz.inDaylightTime(date)); in testPreHistoricInDaylightTime() 80 TimeZone tz = TimeZone.getTimeZone("Africa/Bissau"); in testPreHistoricOffsets() local 83 assertNonDaylightOffset(-3600, parseIsoTime("1911-01-01T00:00:00.0+0000"), tz); in testPreHistoricOffsets() 85 assertNonDaylightOffset(-3600, parseIsoTime("1912-01-01T12:00:00.0-0100"), tz); in testPreHistoricOffsets() 88 assertNonDaylightOffset(0, parseIsoTime("1980-01-01T00:00:00.0+0000"), tz); in testPreHistoricOffsets() [all …]
|
D | CalendarTest.java | 48 TimeZone tz = java.util.TimeZone.getTimeZone("GMT+7"); in test_setTimeZone() local 49 cal.setTimeZone(tz); in test_setTimeZone()
|
/libcore/luni/src/test/java/libcore/icu/ |
D | DateIntervalFormatTest.java | 33 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_formatDateInterval() local 35 Calendar c = Calendar.getInstance(tz, Locale.US); in test_formatDateInterval() 59 …assertEquals("Monday", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SHOW_WEEKDAY… in test_formatDateInterval() 60 …assertEquals("January 19", formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + H… in test_formatDateInterval() 61 assertEquals("3:30 AM", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_SHOW_TIME)); in test_formatDateInterval() 62 …assertEquals("January 19, 2009", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SH… in test_formatDateInterval() 63 …assertEquals("January 19", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_NO_YEAR)… in test_formatDateInterval() 64 …assertEquals("January", formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + HOUR… in test_formatDateInterval() 65 …assertEquals("3:30 AM", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_12HOUR | FORMAT_SH… in test_formatDateInterval() 66 …assertEquals("03:30", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_24HOUR | FORMAT_SHOW… in test_formatDateInterval() [all …]
|
/libcore/luni/src/main/java/java/util/ |
D | SimpleTimeZone.java | 319 SimpleTimeZone tz = (SimpleTimeZone) object; in equals() local 320 return getID().equals(tz.getID()) in equals() 321 && rawOffset == tz.rawOffset in equals() 322 && useDaylight == tz.useDaylight in equals() 323 && (!useDaylight || (startYear == tz.startYear in equals() 324 && startMonth == tz.startMonth in equals() 325 && startDay == tz.startDay && startMode == tz.startMode in equals() 326 && startDayOfWeek == tz.startDayOfWeek in equals() 327 && startTime == tz.startTime && endMonth == tz.endMonth in equals() 328 && endDay == tz.endDay in equals() [all …]
|
D | Date.java | 705 TimeZone tz = cal.getTimeZone(); in toString() local 719 result.append(tz.getDisplayName(tz.inDaylightTime(this), TimeZone.SHORT)); in toString()
|
/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() 244 TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); in test_getAvailableIDs_I() local 245 int rawoffset = tz.getRawOffset(); in test_getAvailableIDs_I() 282 TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); in test_hasSameRules_Ljava_util_TimeZone() local 283 int offset = tz.getRawOffset(); in test_hasSameRules_Ljava_util_TimeZone() 289 if (!(ids[i].equalsIgnoreCase(tz.getID()))) { in test_hasSameRules_Ljava_util_TimeZone() 291 assertTrue(tz.hasSameRules(sameZone)); in test_hasSameRules_Ljava_util_TimeZone() 298 assertFalse("should return false when parameter is null", tz in test_hasSameRules_Ljava_util_TimeZone()
|
D | DateTest.java | 455 TimeZone tz = TimeZone.getDefault(); in test_toString() local 462 TimeZone.setDefault(tz); in test_toString() 490 TimeZone tz = TimeZone.getDefault(); in test_toLocaleString() local 500 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 | 4170 for (String tz : TimeZone.getAvailableIDs()) { in test_DaylightTime() 4171 if (tz.equals("America/Los_Angeles")) { in test_DaylightTime() 4172 c1.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4173 c2.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4176 if (tz.equals("America/Panama")) { in test_DaylightTime() 4177 c1.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime() 4178 c2.setTimeZone(TimeZone.getTimeZone(tz)); in test_DaylightTime()
|
D | GregorianCalendarTest.java | 328 TimeZone tz = TimeZone.getTimeZone(ids[i]); in test_getActualMaximumI() local 329 gc.setTimeZone(tz); in test_getActualMaximumI()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | DateIntervalFormat.java | 70 TimeZone tz = (olsonId != null) ? TimeZone.getTimeZone(olsonId) : TimeZone.getDefault(); in formatDateRange() local 71 return formatDateRange(Locale.getDefault(), tz, startMs, endMs, flags); in formatDateRange() 76 …public static String formatDateRange(Locale locale, TimeZone tz, long startMs, long endMs, int fla… in formatDateRange() argument 77 Calendar startCalendar = Calendar.getInstance(tz); in formatDateRange() 84 endCalendar = Calendar.getInstance(tz); in formatDateRange() 102 … return formatDateInterval(getFormatter(skeleton, locale.toString(), tz.getID()), startMs, endMs); in formatDateRange()
|
D | TimeZoneNames.java | 160 public static native String getExemplarLocation(String locale, String tz); in getExemplarLocation() argument
|
/libcore/luni/src/main/native/ |
D | libcore_icu_TimeZoneNames.cpp | 131 ScopedJavaUnicodeString tz(env, javaTz); in TimeZoneNames_getExemplarLocation() local 132 if (!tz.valid()) { in TimeZoneNames_getExemplarLocation() 138 names->getDisplayName(tz.unicodeString(), UTZNM_EXEMPLAR_LOCATION, now, s); in TimeZoneNames_getExemplarLocation()
|
/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/luni/src/test/java/libcore/java/text/ |
D | OldDateFormatTest.java | 128 TimeZone tz = format.getTimeZone(); in test_getTimeZone() local 135 assertTrue("Incorrect time zone", tz.equals(format.getCalendar() in test_getTimeZone() 472 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_setTimeZoneLjava_util_TimeZone() local 473 format.setTimeZone(tz); in test_setTimeZoneLjava_util_TimeZone() 474 assertTrue("TimeZone is set incorrectly", tz.equals(format in test_setTimeZoneLjava_util_TimeZone()
|
/libcore/luni/src/main/java/java/text/ |
D | DateFormatSymbols.java | 500 String getTimeZoneDisplayName(TimeZone tz, boolean daylight, int style) { in getTimeZoneDisplayName() argument 508 return TimeZoneNames.getDisplayName(zoneStrings, tz.getID(), daylight, style); in getTimeZoneDisplayName()
|
D | SimpleDateFormat.java | 740 TimeZone tz = calendar.getTimeZone(); in appendTimeZone() local 743 String zoneString = formatData.getTimeZoneDisplayName(tz, daylight, style); in appendTimeZone()
|