Home
last modified time | relevance | path

Searched refs:tz (Results 1 – 18 of 18) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DOldTimeZoneTest.java86 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 …]
DTimeZoneTest.java61 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 …]
DCalendarTest.java48 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/
DDateIntervalFormatTest.java33 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/
DSimpleTimeZone.java319 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 …]
DDate.java705 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/
DTimeZoneTest.java224 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()
DDateTest.java455 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()
DSimpleTimeZoneTest.java262 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()
DFormatterTest.java4170 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()
DGregorianCalendarTest.java328 TimeZone tz = TimeZone.getTimeZone(ids[i]); in test_getActualMaximumI() local
329 gc.setTimeZone(tz); in test_getActualMaximumI()
/libcore/luni/src/main/java/libcore/icu/
DDateIntervalFormat.java70 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()
DTimeZoneNames.java160 public static native String getExemplarLocation(String locale, String tz); in getExemplarLocation() argument
/libcore/luni/src/main/native/
Dlibcore_icu_TimeZoneNames.cpp131 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/
DSupport_SimpleDateFormat.java49 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/
DOldDateFormatTest.java128 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/
DDateFormatSymbols.java500 String getTimeZoneDisplayName(TimeZone tz, boolean daylight, int style) { in getTimeZoneDisplayName() argument
508 return TimeZoneNames.getDisplayName(zoneStrings, tz.getID(), daylight, style); in getTimeZoneDisplayName()
DSimpleDateFormat.java740 TimeZone tz = calendar.getTimeZone(); in appendTimeZone() local
743 String zoneString = formatData.getTimeZoneDisplayName(tz, daylight, style); in appendTimeZone()