/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 | 69 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in testPreHistoricInDaylightTime() local 70 TimeZone.setDefault(tz); in testPreHistoricInDaylightTime() 74 assertEquals(-28800000, tz.getOffset(date.getTime())); in testPreHistoricInDaylightTime() 75 assertFalse(tz.inDaylightTime(date)); in testPreHistoricInDaylightTime() 80 assertEquals(-28800000, tz.getOffset(date.getTime())); in testPreHistoricInDaylightTime() 81 assertFalse(tz.inDaylightTime(date)); in testPreHistoricInDaylightTime() 94 TimeZone tz = TimeZone.getTimeZone("Africa/Bissau"); in testPreHistoricOffsets() local 97 assertNonDaylightOffset(-3600, parseIsoTime("1911-01-01T00:00:00.0+0000"), tz); in testPreHistoricOffsets() 99 assertNonDaylightOffset(-3600, parseIsoTime("1912-01-01T12:00:00.0-0100"), tz); in testPreHistoricOffsets() 102 assertNonDaylightOffset(0, parseIsoTime("1980-01-01T00:00:00.0+0000"), tz); in testPreHistoricOffsets() [all …]
|
D | CalendarTest.java | 53 TimeZone tz = java.util.TimeZone.getTimeZone("GMT+7"); in test_setTimeZone() local 54 cal.setTimeZone(tz); in test_setTimeZone()
|
/libcore/luni/src/test/java/libcore/icu/ |
D | RelativeDateTimeFormatterTest.java | 42 TimeZone tz = TimeZone.getTimeZone("GMT"); in test_getRelativeTimeSpanStringCTS() local 43 Calendar cal = Calendar.getInstance(tz, en_US); in test_getRelativeTimeSpanStringCTS() 49 getRelativeTimeSpanString(en_US, tz, baseTime - SECOND_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS() 52 getRelativeTimeSpanString(en_US, tz, baseTime + SECOND_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS() 56 getRelativeTimeSpanString(en_US, tz, 0, MINUTE_IN_MILLIS, MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS() 58 getRelativeTimeSpanString(en_US, tz, MINUTE_IN_MILLIS, 0, MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS() 61 getRelativeTimeSpanString(en_US, tz, baseTime - 42 * MINUTE_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS() 64 getRelativeTimeSpanString(en_US, tz, baseTime + 42 * MINUTE_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS() 69 getRelativeTimeSpanString(en_US, tz, baseTime - TWO_HOURS_IN_MS, baseTime, in test_getRelativeTimeSpanStringCTS() 72 getRelativeTimeSpanString(en_US, tz, baseTime + TWO_HOURS_IN_MS, baseTime, in test_getRelativeTimeSpanStringCTS() [all …]
|
D | DateIntervalFormatTest.java | 35 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_formatDateInterval() local 37 Calendar c = Calendar.getInstance(tz, ULocale.US); in test_formatDateInterval() 61 …assertEquals("Monday", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SHOW_WEEKDAY… in test_formatDateInterval() 62 …assertEquals("January 19", formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + H… in test_formatDateInterval() 63 assertEquals("3:30 AM", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_SHOW_TIME)); in test_formatDateInterval() 64 …assertEquals("January 19, 2009", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_SH… in test_formatDateInterval() 65 …assertEquals("January 19", formatDateRange(en_US, tz, fixedTime, fixedTime + HOUR, FORMAT_NO_YEAR)… in test_formatDateInterval() 66 …assertEquals("January", formatDateRange(en_US, tz, timeWithCurrentYear, timeWithCurrentYear + HOUR… in test_formatDateInterval() 67 …assertEquals("3:30 AM", formatDateRange(en_US, tz, fixedTime, fixedTime, FORMAT_12HOUR | FORMAT_SH… in test_formatDateInterval() 68 …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() 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 | 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()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | TimeZoneNames.java | 85 TimeZone tz = null; in addOffsetStrings() local 90 if (tz == null) { in addOffsetStrings() 91 tz = TimeZone.getTimeZone(result[i][0]); in addOffsetStrings() 93 int offsetMillis = tz.getRawOffset(); in addOffsetStrings() 95 offsetMillis += tz.getDSTSavings(); in addOffsetStrings() 178 public static native String getExemplarLocation(String locale, String tz); in getExemplarLocation() argument
|
D | RelativeDateTimeFormatter.java | 91 public static String getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, in getRelativeTimeSpanString() argument 96 return getRelativeTimeSpanString(locale, tz, time, now, minResolution, flags, displayContext); in getRelativeTimeSpanString() 99 public static String getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, in getRelativeTimeSpanString() argument 104 if (tz == null) { in getRelativeTimeSpanString() 108 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in getRelativeTimeSpanString() 260 public static String getRelativeDateTimeString(Locale locale, java.util.TimeZone tz, long time, in getRelativeDateTimeString() argument 266 if (tz == null) { in getRelativeDateTimeString() 270 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in getRelativeDateTimeString()
|
D | DateIntervalFormat.java | 46 TimeZone tz = (olsonId != null) ? TimeZone.getTimeZone(olsonId) : TimeZone.getDefault(); in formatDateRange() local 47 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in formatDateRange()
|
D | DateUtilsBridge.java | 53 public static android.icu.util.TimeZone icuTimeZone(java.util.TimeZone tz) { in icuTimeZone() argument 54 JavaTimeZone javaTimeZone = new JavaTimeZone(tz, null); in icuTimeZone()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 162 TimeZone tz = AMERICA_LOS_ANGELES; in testFiveCount_Z() local 163 assertEquals("-0800", formatDate(Locale.ENGLISH, "Z", tz)); in testFiveCount_Z() 164 assertEquals("-0800", formatDate(Locale.ENGLISH, "ZZ", tz)); in testFiveCount_Z() 165 assertEquals("-0800", formatDate(Locale.ENGLISH, "ZZZ", tz)); in testFiveCount_Z() 166 assertEquals("GMT-08:00", formatDate(Locale.ENGLISH, "ZZZZ", tz)); in testFiveCount_Z() 167 assertEquals("-08:00", formatDate(Locale.ENGLISH, "ZZZZZ", tz)); in testFiveCount_Z() 204 private String formatDate(Locale l, String fmt, TimeZone tz) { in formatDate() argument 206 dateFormat.setTimeZone(tz); in formatDate() 227 private static Calendar parseDate(Locale l, String fmt, String value, TimeZone tz) { in parseDate() argument 229 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/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/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 | 3571 TimeZone tz = TimeZone.getTimeZone(id); in readObject() local 3572 if (tz != null && tz.hasSameRules(zone) && tz.getID().equals(id)) { in readObject() 3573 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()
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | IcuZoneRulesProvider.java | 110 OlsonTimeZone tz = (OlsonTimeZone) timeZone; in generateZoneRules() local 111 TimeZoneRule[] rules = tz.getTimeZoneRules(); in generateZoneRules() 127 TimeZoneTransition transition = tz.getNextTransition(Long.MIN_VALUE, false); in generateZoneRules() 172 transition = tz.getNextTransition(transition.getTime(), false); in generateZoneRules() 183 transition = tz.getNextTransition(transition.getTime(), false); in generateZoneRules()
|
/libcore/luni/src/main/native/ |
D | libcore_icu_TimeZoneNames.cpp | 130 ScopedJavaUnicodeString tz(env, javaTz); in TimeZoneNames_getExemplarLocation() local 131 if (!tz.valid()) { in TimeZoneNames_getExemplarLocation() 137 names->getDisplayName(tz.unicodeString(), UTZNM_EXEMPLAR_LOCATION, now, s); in TimeZoneNames_getExemplarLocation()
|
/libcore/ojluni/src/main/java/java/text/ |
D | SimpleDateFormat.java | 1271 TimeZone tz = calendar.getTimeZone(); in subFormat() local 1279 formatData.getZoneStringsWrapper(), tz.getID(), daylight, tzstyle); in subFormat() 1281 if (UTC_ZONE_IDS.contains(tz.getID())) { in subFormat() 1295 String canonicalID = android.icu.util.TimeZone.getCanonicalID(tz.getID()); in subFormat() 1526 final TimeZone tz = getTimeZone(); in parse() local 1530 setTimeZone(tz); in parse() 1873 TimeZone tz = null; in subParseZoneStringFromSymbols() local 1884 tz = TimeZone.getTimeZone(zoneNames[0]); in subParseZoneStringFromSymbols() 1887 if (tz == null) { in subParseZoneStringFromSymbols() 1895 tz = TimeZone.getTimeZone(zoneNames[0]); in subParseZoneStringFromSymbols() [all …]
|
/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/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/luni/src/main/java/libcore/util/ |
D | TimeZoneFinder.java | 536 TimeZone tz = TimeZone.getTimeZone(zoneIdString); in process() local 537 if (tz.getID().equals(TimeZone.UNKNOWN_ZONE_ID)) { in process() 541 timeZones.add(tz.freeze()); in process()
|
/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()
|