/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TimeZoneTest.java | 28 import java.util.TimeZone; 34 private TimeZone processDefault; 41 TimeZone.getDefault(), TimeZone.getDefault()); in test_getDefault() 51 TimeZone st1 = TimeZone.getTimeZone("America/New_York"); in test_getDSTSavings() 56 st1 = TimeZone.getTimeZone("Australia/Lord_Howe"); in test_getDSTSavings() 61 TimeZone tz1 = new Support_TimeZone(-5 * ONE_HOUR, true); in test_getDSTSavings() 78 TimeZone st1 = TimeZone.getTimeZone("EST"); in test_getOffset_long() 86 st1 = TimeZone.getTimeZone("EST"); in test_getOffset_long() 91 TimeZone tz1 = new Support_TimeZone(-5 * ONE_HOUR, true); in test_getOffset_long() 110 "GMT", TimeZone.getTimeZone("SMT-8").getID()); in test_getTimeZoneLjava_lang_String() [all …]
|
D | DateTest.java | 25 import java.util.TimeZone; 317 cal.setTimeZone(TimeZone.getTimeZone("GMT")); in test_parseLjava_lang_String() 322 cal.setTimeZone(TimeZone.getTimeZone("MST")); in test_parseLjava_lang_String() 327 cal.setTimeZone(TimeZone.getTimeZone("GMT")); in test_parseLjava_lang_String() 456 TimeZone tz = TimeZone.getDefault(); in test_toString() 457 TimeZone.setDefault(TimeZone.getTimeZone("GMT-5")); in test_toString() 463 TimeZone.setDefault(tz); in test_toString() 467 TimeZone.setDefault(TimeZone.getTimeZone("MST")); in test_toString() 491 TimeZone tz = TimeZone.getDefault(); in test_toLocaleString() 492 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in test_toLocaleString() [all …]
|
D | SimpleTimeZoneTest.java | 24 import java.util.TimeZone; 172 TimeZone.LONG, in test_ConstructorILjava_lang_StringIIIIIIIIIII() 179 TimeZone.SHORT, in test_ConstructorILjava_lang_StringIIIIIIIIIII() 181 TimeZone.LONG, in test_ConstructorILjava_lang_StringIIIIIIIIIII() 184 TimeZone.LONG)); in test_ConstructorILjava_lang_StringIIIIIIIIIII() 188 TimeZone.LONG, in test_ConstructorILjava_lang_StringIIIIIIIIIII() 195 TimeZone.SHORT, in test_ConstructorILjava_lang_StringIIIIIIIIIII() 197 TimeZone.LONG, in test_ConstructorILjava_lang_StringIIIIIIIIIII() 200 TimeZone.LONG)); in test_ConstructorILjava_lang_StringIIIIIIIIIII() 262 TimeZone tz = TimeZone.getTimeZone("EST"); in test_equalsLjava_lang_Object() [all …]
|
D | GregorianCalendarTest.java | 26 import java.util.TimeZone; 31 private static final TimeZone AMERICA_CHICAGO = TimeZone.getTimeZone("America/Chicago"); 32 private static final TimeZone AMERICA_NEW_YORK = TimeZone.getTimeZone("America/New_York"); 72 TimeZone.getDefault())); in test_ConstructorIII() 95 TimeZone.getDefault())); in test_ConstructorIIIII() 126 TimeZone.getDefault())); in test_ConstructorIIIIII() 151 TimeZone.getDefault(); in test_ConstructorLjava_util_TimeZone() 166 Calendar c1 = new GregorianCalendar(TimeZone.getTimeZone("GMT")); in test_ConstructorLjava_util_TimeZone() 186 TimeZone.getDefault(); in test_ConstructorLjava_util_TimeZoneLjava_util_Locale() 342 String[] ids = TimeZone.getAvailableIDs(); in test_getActualMaximumI() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldTimeZoneTest.java | 22 import java.util.TimeZone; 27 static class Mock_TimeZone extends TimeZone { 59 TimeZone tz1 = TimeZone.getDefault(); in test_clone() 60 TimeZone tz2 = (TimeZone)tz1.clone(); in test_clone() 66 String[] str = TimeZone.getAvailableIDs(); in test_getAvailableIDs() 70 assertNotNull(TimeZone.getTimeZone(str[i])); in test_getAvailableIDs() 75 String[] str = TimeZone.getAvailableIDs(0); in test_getAvailableIDsI() 79 assertNotNull(TimeZone.getTimeZone(str[i])); in test_getAvailableIDsI() 85 TimeZone tz = TimeZone.getTimeZone("GMT-6"); in test_getDisplayName() 87 tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayName() [all …]
|
D | TimeZoneTest.java | 27 import java.util.TimeZone; 32 TimeZone asiaTaipei = TimeZone.getTimeZone("Asia/Taipei"); in test_useDaylightTime_Taiwan() 38 TimeZone atlanticReykjavik = TimeZone.getTimeZone("Atlantic/Reykjavik"); in test_useDaylightTime_Iceland() 52 TimeZone tz0001 = new SimpleTimeZone(60000, "ONE MINUTE"); in testCustomTimeZoneDisplayNames() 53 TimeZone tz0130 = new SimpleTimeZone(5400000, "ONE HOUR, THIRTY"); in testCustomTimeZoneDisplayNames() 54 TimeZone tzMinus0130 = new SimpleTimeZone(-5400000, "NEG ONE HOUR, THIRTY"); in testCustomTimeZoneDisplayNames() 55 assertEquals("GMT+00:01", tz0001.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames() 56 assertEquals("GMT+01:30", tz0130.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames() 57 assertEquals("GMT-01:30", tzMinus0130.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames() 64 TimeZone tz = TimeZone.getTimeZone("CET"); in testPreHistoricInDaylightTime() [all …]
|
D | SimpleTimeZoneTest.java | 25 import java.util.TimeZone; 41 private static final TimeZone UTC = TimeZone.getTimeZone("UTC"); 48 TimeZone timeZone = TimeZone.getTimeZone("Europe/Paris"); in testStandardParis2014() 54 TimeZone timeZone = new SimpleTimeZone(PARIS_RAW_OFFSET, "Europe/Paris", in testDstParis2014_LastSundayMarch_LastSundayOctober_UtcTime() 62 TimeZone timeZone = new SimpleTimeZone(PARIS_RAW_OFFSET, "Europe/Paris", in testDstParis2014_SundayAfter25thMarch_SundayAfter25thOctober_UtcTime() 70 TimeZone timeZone = new SimpleTimeZone(PARIS_RAW_OFFSET, "Europe/Paris", in testDstParis2014_30thMarch_26thOctober_UtcTime() 81 private void checkDstParis2014(TimeZone timeZone) { in checkDstParis2014() 88 TimeZone timeZone = new SimpleTimeZone(-18000000, "EST", in testDst_1stSundayApril_1stSundayOctober_DefaultTime() 107 TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); in testStandardNewYork2014() 113 TimeZone timeZone = new SimpleTimeZone(NEW_YORK_RAW_OFFSET, "EST", in testDstNewYork2014_2ndSundayMarch_1stSundayNovember_StandardTime() [all …]
|
D | OldGregorianCalendarTest.java | 24 import java.util.TimeZone; 33 GregorianCalendar gc1 = new GregorianCalendar(TimeZone.getTimeZone("GMT+1"), Locale.FRANCE); in testGetHour() 35 GregorianCalendar gc2 = new GregorianCalendar(TimeZone.getTimeZone("GMT+2"), Locale.US); in testGetHour() 42 GregorianCalendar g1 = new GregorianCalendar(TimeZone.getTimeZone("Europe/Moscow")); in test_computeTime() 56 TimeZone.getTimeZone("Europe/London"), in test_computeFields() 70 TimeZone.getTimeZone("Europe/London"), in test_hashCode() 76 TimeZone.getTimeZone("Europe/Moscow")); in test_hashCode() 84 TimeZone.getTimeZone("Europe/London"), in test_setFirstDayOfWeekI() 98 TimeZone.getTimeZone("Europe/London"), in test_setMinimalDaysInFirstWeekI()
|
D | CalendarTest.java | 26 import java.util.TimeZone; 31 private static final TimeZone AMERICA_SAO_PAULO = TimeZone.getTimeZone("America/Sao_Paulo"); 34 private static final TimeZone AUSTRALIA_LORD_HOWE = TimeZone.getTimeZone("Australia/Lord_Howe"); 41 private static final TimeZone ASIA_KUALA_LUMPUR = TimeZone.getTimeZone("Asia/Kuala_Lumpur"); 43 private static final TimeZone ASIA_SEOUL = TimeZone.getTimeZone("Asia/Seoul"); 49 Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.US); in test_setTimeZone() 51 TimeZone tz = TimeZone.getTimeZone("GMT+7"); in test_setTimeZone() 150 private void testSetSelfConsistent(TimeZone timeZone, int year, int month, int day) { in testSetSelfConsistent() 164 TimeZone timeZone = TimeZone.getTimeZone("Europe/Paris"); in testToInstant() 205 calendar.setTimeZone(TimeZone.getTimeZone("GMT-08:00")); in testCalendarSerialization() [all …]
|
D | GregorianCalendarTest.java | 28 import java.util.TimeZone; 33 private static final TimeZone LOS_ANGELES = TimeZone.getTimeZone("America/Los_Angeles"); 35 private static final TimeZone LONDON = TimeZone.getTimeZone("Europe/London"); 162 TimeZone timeZone = TimeZone.getTimeZone("America/Los_Angeles"); in test_computeTime_enteringDst_TimeZone_LosAngeles_2014() 175 TimeZone timeZone = TimeZone.getTimeZone("America/Los_Angeles"); in test_computeTime_enteringDst_DelegatingTimeZone_LosAngeles_2014() 194 TimeZone zoneInfo = TimeZone.getTimeZone("America/Los_Angeles"); in test_computeTime_enteringDst() 293 TimeZone timeZone = TimeZone.getTimeZone("Europe/Paris"); in test_fromZonedDateTime() 319 TimeZone timeZone = TimeZone.getTimeZone("Europe/Paris"); in test_toZonedDateTime() 327 private long getDstLosAngeles2014(TimeZone timeZone) { in getDstLosAngeles2014() 335 private void checkDstLosAngeles2014(TimeZone timeZone) { in checkDstLosAngeles2014() [all …]
|
D | OldAndroidLocaleTest.java | 25 import java.util.TimeZone; 56 TimeZone berlin = TimeZone.getTimeZone("Europe/Berlin"); in testResourceBundles() 65 berlin.getDisplayName(false, TimeZone.LONG, eng)); in testResourceBundles() 67 berlin.getDisplayName(true, TimeZone.LONG, eng)); in testResourceBundles() 70 berlin.getDisplayName(false, TimeZone.LONG, deu)); in testResourceBundles() 72 berlin.getDisplayName(true, TimeZone.LONG, deu)); in testResourceBundles()
|
D | DateTest.java | 23 import java.util.TimeZone; 31 TimeZone.setDefault(TimeZone.getTimeZone("America/Chicago")); in test_toString_us() 40 TimeZone.setDefault(TimeZone.getTimeZone("America/Chicago")); in test_toString_nonUs() 46 TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); in test_toGMTString_us() 69 TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); in test_toGMTString_nonUs()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | TimeZoneBenchmark.java | 19 import java.util.TimeZone; 24 TimeZone.getDefault(); in timeTimeZone_getDefault() 30 TimeZone.getTimeZone("UTC"); in timeTimeZone_getTimeZoneUTC() 35 String defaultId = TimeZone.getDefault().getID(); in timeTimeZone_getTimeZone_default() 37 TimeZone.getTimeZone(defaultId); in timeTimeZone_getTimeZone_default() 44 TimeZone.getTimeZone("America/Caracas"); in timeTimeZone_getTimeZone_America_Caracas() 51 TimeZone.getTimeZone("America/Santiago"); in timeTimeZone_getTimeZone_America_Santiago() 57 TimeZone.getTimeZone("GMT+10"); in timeTimeZone_getTimeZone_GMT_plus_10()
|
/libcore/luni/src/main/java/libcore/timezone/ |
D | CountryTimeZones.java | 19 import android.icu.util.TimeZone; 45 public final TimeZone mTimeZone; 51 public OffsetResult(TimeZone timeZone, boolean oneMatch) { in OffsetResult() 141 private TimeZone icuDefaultTimeZone; 143 private List<TimeZone> icuTimeZones; 211 public synchronized TimeZone getDefaultTimeZone() { in getDefaultTimeZone() 213 TimeZone defaultTimeZone; in getDefaultTimeZone() 282 public synchronized List<TimeZone> getIcuTimeZones() { in getIcuTimeZones() 284 ArrayList<TimeZone> mutableList = new ArrayList<>(timeZoneMappings.size()); in getIcuTimeZones() 287 TimeZone timeZone; in getIcuTimeZones() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | TimeZone.java | 137 abstract public class TimeZone implements Serializable, Cloneable { class 142 public TimeZone() { in TimeZone() method in TimeZone 171 private static final TimeZone GMT = new SimpleTimeZone(0, "GMT"); 172 private static final TimeZone UTC = new SimpleTimeZone(0, "UTC"); 403 String canonicalID = android.icu.util.TimeZone.getCanonicalID(getID()); in getDisplayName() 561 public static synchronized TimeZone getTimeZone(String id) { in getTimeZone() 569 return (TimeZone) GMT.clone(); in getTimeZone() 572 return (TimeZone) UTC.clone(); in getTimeZone() 577 TimeZone zone = null; in getTimeZone() 589 return (zone != null) ? zone : (TimeZone) GMT.clone(); in getTimeZone() [all …]
|
/libcore/luni/src/test/java/libcore/java/sql/ |
D | TimestampTest.java | 21 import java.util.TimeZone; 29 TimeZone defaultTimeZone = TimeZone.getDefault(); in testToString() 30 TimeZone.setDefault(TimeZone.getTimeZone("UTC")); in testToString() 44 TimeZone.setDefault(defaultTimeZone); in testToString() 51 TimeZone defaultTimeZone = TimeZone.getDefault(); in testValueOf() 52 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in testValueOf() 66 TimeZone.setDefault(defaultTimeZone); in testValueOf()
|
/libcore/luni/src/test/java/libcore/libcore/icu/ |
D | TimeZoneIntegrationTest.java | 61 java.util.TimeZone origTz = java.util.TimeZone.getDefault(); in testJavaSetDefaultAppliesToIcuTimezone() 63 android.icu.util.TimeZone origIcuTz = android.icu.util.TimeZone.getDefault(); in testJavaSetDefaultAppliesToIcuTimezone() 66 java.util.TimeZone tz = java.util.TimeZone.getTimeZone("GMT-05:00"); in testJavaSetDefaultAppliesToIcuTimezone() 67 java.util.TimeZone.setDefault(tz); in testJavaSetDefaultAppliesToIcuTimezone() 68 android.icu.util.TimeZone icuTz = android.icu.util.TimeZone.getDefault(); in testJavaSetDefaultAppliesToIcuTimezone() 71 java.util.TimeZone.setDefault(origTz); in testJavaSetDefaultAppliesToIcuTimezone() 85 java.util.TimeZone otherTimeZone = java.util.TimeZone.getTimeZone("Europe/London"); in testSetDefaultDeadlock() 91 java.util.TimeZone.setDefault(otherTimeZone); in testSetDefaultDeadlock() 92 java.util.TimeZone.setDefault(null); in testSetDefaultDeadlock() 102 android.icu.util.TimeZone.getDefault(); in testSetDefaultDeadlock() [all …]
|
D | DateIntervalFormatTest.java | 20 import android.icu.util.TimeZone; 25 import static android.icu.util.TimeZone.GMT_ZONE; 39 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_formatDateInterval() 177 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test8862241() 191 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10089890() 192 TimeZone pacific = TimeZone.getTimeZone("America/Los_Angeles"); in test10089890() 213 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10318326() 240 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10560853_when_time_not_displayed() 264 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10560853_for_single_day_events() 276 TimeZone utc = TimeZone.getTimeZone("UTC"); in test_single_day_events_later_than_epoch() [all …]
|
D | RelativeDateTimeFormatterTest.java | 21 import java.util.TimeZone; 44 TimeZone tz = TimeZone.getTimeZone("GMT"); in test_getRelativeTimeSpanStringCTS() 100 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getRelativeTimeSpanString_helper() 357 TimeZone tz = TimeZone.getTimeZone("Europe/Berlin"); in test_getRelativeTimeSpanStringGerman() 385 TimeZone tz = TimeZone.getTimeZone("Europe/Paris"); in test_getRelativeTimeSpanStringFrench() 414 TimeZone tz = TimeZone.getDefault(); in test_getRelativeDateTimeStringCTS() 425 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getRelativeDateTimeString() 469 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getRelativeDateTimeStringDST() 514 TimeZone tz = TimeZone.getTimeZone("Europe/Rome"); in test_getRelativeDateTimeStringItalian() 543 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test5252772() [all …]
|
/libcore/luni/src/test/java/libcore/libcore/timezone/ |
D | TimeZoneFinderTest.java | 23 import android.icu.util.TimeZone; 51 private static final TimeZone NEW_YORK_TZ = TimeZone.getTimeZone("America/New_York"); 52 private static final TimeZone LONDON_TZ = TimeZone.getTimeZone("Europe/London"); 54 private static final TimeZone REYKJAVIK_TZ = TimeZone.getTimeZone("Atlantic/Reykjavik"); 57 private static final TimeZone UTC_TZ = TimeZone.getTimeZone("Etc/UTC"); 583 List<TimeZone> gbList = finder.lookupTimeZonesByCountry("gb"); in lookupTimeZonesByCountry_structuresAreImmutable() 717 TimeZone noDstMatch1 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate() 721 TimeZone noDstMatch2 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate() 725 TimeZone noDstMatch3 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate() 729 TimeZone noDstMatch4 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate() [all …]
|
D | CountryTimeZonesTest.java | 21 import android.icu.util.TimeZone; 44 private static final TimeZone NEW_YORK_TZ = TimeZone.getTimeZone("America/New_York"); 45 private static final TimeZone LONDON_TZ = TimeZone.getTimeZone("Europe/London"); 47 private static final TimeZone REYKJAVIK_TZ = TimeZone.getTimeZone("Atlantic/Reykjavik"); 50 private static final TimeZone UTC_TZ = TimeZone.getTimeZone("Etc/UTC"); 125 List<TimeZone> tzList = countryTimeZones.getIcuTimeZones(); in structuresAreImmutable() 685 private void assertImmutableTimeZone(TimeZone timeZone) { in assertImmutableTimeZone() 701 private static void assertZoneEquals(TimeZone expected, TimeZone actual) { in assertZoneEquals() 711 private static void assertZonesEqual(List<TimeZone> expected, List<TimeZone> actual) { in assertZonesEqual() 716 private static TimeZone zone(String id) { in zone() [all …]
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | Gregorian.java | 28 import java.util.TimeZone; 44 protected Date(TimeZone zone) { in Date() 76 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() 84 public Date newCalendarDate(TimeZone zone) { in newCalendarDate()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | DateIntervalFormat.java | 24 import java.util.TimeZone; 52 TimeZone tz = (olsonId != null) ? TimeZone.getTimeZone(olsonId) : TimeZone.getDefault(); in formatDateRange() 53 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in formatDateRange() 60 public static String formatDateRange(ULocale icuLocale, android.icu.util.TimeZone icuTimeZone, in formatDateRange() 100 android.icu.util.TimeZone icuTimeZone) { in getFormatter()
|
D | TimeZoneNames.java | 24 import java.util.TimeZone; 34 private static final String[] availableTimeZoneIds = TimeZone.getAvailableIDs(); 87 TimeZone tz = null; in addOffsetStrings() 93 tz = TimeZone.getTimeZone(result[i][0]); in addOffsetStrings() 99 result[i][j] = TimeZone.createGmtOffsetString( in addOffsetStrings() 139 return (style == TimeZone.LONG) ? row[LONG_NAME_DST] : row[SHORT_NAME_DST]; in getDisplayName() 141 return (style == TimeZone.LONG) ? row[LONG_NAME] : row[SHORT_NAME]; in getDisplayName()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | SimpleDateFormatTest.java | 28 import java.util.TimeZone; 32 private static final TimeZone AMERICA_LOS_ANGELES = TimeZone.getTimeZone("America/Los_Angeles"); 33 private static final TimeZone AUSTRALIA_LORD_HOWE = TimeZone.getTimeZone("Australia/Lord_Howe"); 34 private static final TimeZone UTC = TimeZone.getTimeZone("Etc/UTC"); 182 TimeZone tz = AMERICA_LOS_ANGELES; in testFiveCount_Z() 224 private String formatDate(Locale l, String fmt, TimeZone tz) { in formatDate() 247 private static Calendar parseDate(Locale l, String fmt, String value, TimeZone tz) { in parseDate() 286 TimeZone europeBerlin = TimeZone.getTimeZone("Europe/Berlin"); in testFormattingUncommonTimeZoneAbbreviations() 287 TimeZone europeZurich = TimeZone.getTimeZone("Europe/Zurich"); in testFormattingUncommonTimeZoneAbbreviations() 309 TimeZone americaChicago = TimeZone.getTimeZone("America/Chicago"); in testTimeZoneFormatting() [all …]
|