Home
last modified time | relevance | path

Searched refs:TimeZone (Results 1 – 25 of 90) sorted by relevance

1234

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DTimeZoneTest.java28 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 …]
DDateTest.java25 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 …]
DSimpleTimeZoneTest.java24 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 …]
DGregorianCalendarTest.java26 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/
DOldTimeZoneTest.java22 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 …]
DTimeZoneTest.java30 import java.util.TimeZone;
38 TimeZone asiaTaipei = TimeZone.getTimeZone("Asia/Taipei"); in test_useDaylightTime_Taiwan()
44 TimeZone atlanticReykjavik = TimeZone.getTimeZone("Atlantic/Reykjavik"); in test_useDaylightTime_Iceland()
58 TimeZone tz0001 = new SimpleTimeZone(60000, "ONE MINUTE"); in testCustomTimeZoneDisplayNames()
59 TimeZone tz0130 = new SimpleTimeZone(5400000, "ONE HOUR, THIRTY"); in testCustomTimeZoneDisplayNames()
60 TimeZone tzMinus0130 = new SimpleTimeZone(-5400000, "NEG ONE HOUR, THIRTY"); in testCustomTimeZoneDisplayNames()
61 assertEquals("GMT+00:01", tz0001.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames()
62 assertEquals("GMT+01:30", tz0130.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames()
63 assertEquals("GMT-01:30", tzMinus0130.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames()
69 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in testPreHistoricInDaylightTime()
[all …]
DSimpleTimeZoneTest.java25 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 …]
DOldGregorianCalendarTest.java24 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()
DCalendarTest.java28 import java.util.TimeZone;
33 private static final TimeZone AMERICA_SAO_PAULO = TimeZone.getTimeZone("America/Sao_Paulo");
36 private static final TimeZone AUSTRALIA_LORD_HOWE = TimeZone.getTimeZone("Australia/Lord_Howe");
43 private static final TimeZone ASIA_KUALA_LUMPUR = TimeZone.getTimeZone("Asia/Kuala_Lumpur");
45 private static final TimeZone ASIA_SEOUL = TimeZone.getTimeZone("Asia/Seoul");
51 Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.US); in test_setTimeZone()
53 TimeZone tz = java.util.TimeZone.getTimeZone("GMT+7"); in test_setTimeZone()
152 private void testSetSelfConsistent(TimeZone timeZone, int year, int month, int day) { in testSetSelfConsistent()
166 TimeZone timeZone = TimeZone.getTimeZone("Europe/Paris"); in testToInstant()
207 calendar.setTimeZone(TimeZone.getTimeZone("GMT-08:00")); in testCalendarSerialization()
[all …]
DDateTest.java23 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()
60 TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); in test_toGMTString_nonUs()
DGregorianCalendarTest.java28 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 …]
DOldAndroidLocaleTest.java25 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()
/libcore/benchmarks/src/benchmarks/regression/
DTimeZoneBenchmark.java19 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()
DRelativeDateTimeFormatterBenchmark.java20 import java.util.TimeZone;
29 TimeZone utc = TimeZone.getTimeZone("Europe/London"); in timeRelativeDateTimeFormatter_getRelativeTimeSpanString()
39 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeRelativeDateTimeFormatter_getRelativeTimeSpanString_ABBREV()
49 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeRelativeDateTimeFormatter_getRelativeDateTimeString()
59 TimeZone utc = TimeZone.getTimeZone("America/Los_Angeles"); in timeRelativeDateTimeFormatter_getRelativeDateTimeString_ABBREV()
DDateIntervalFormatBenchmark.java19 import android.icu.util.TimeZone;
28 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeDateIntervalFormat_formatDateRange_DATE()
38 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeDateIntervalFormat_formatDateRange_TIME()
48 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeDateIntervalFormat_formatDateRange_DATE_TIME()
/libcore/ojluni/src/main/java/java/util/
DTimeZone.java140 abstract public class TimeZone implements Serializable, Cloneable { class
145 public TimeZone() { in TimeZone() method in TimeZone
174 private static final TimeZone GMT = new SimpleTimeZone(0, "GMT");
175 private static final TimeZone UTC = new SimpleTimeZone(0, "UTC");
554 public static synchronized TimeZone getTimeZone(String id) { in getTimeZone()
562 return (TimeZone) GMT.clone(); in getTimeZone()
565 return (TimeZone) UTC.clone(); in getTimeZone()
570 TimeZone zone = null; in getTimeZone()
582 return (zone != null) ? zone : (TimeZone) GMT.clone(); in getTimeZone()
594 public static TimeZone getTimeZone(ZoneId zoneId) { in getTimeZone()
[all …]
/libcore/luni/src/test/java/libcore/java/sql/
DTimestampTest.java21 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/util/
DTimeZoneFinderTest.java23 import android.icu.util.TimeZone;
50 private static final TimeZone NEW_YORK_TZ = TimeZone.getTimeZone("America/New_York");
51 private static final TimeZone LONDON_TZ = TimeZone.getTimeZone("Europe/London");
53 private static final TimeZone REYKJAVIK_TZ = TimeZone.getTimeZone("Atlantic/Reykjavik");
56 private static final TimeZone UTC_TZ = TimeZone.getTimeZone("Etc/UTC");
392 List<TimeZone> gbList = finder.lookupTimeZonesByCountry("gb"); in lookupTimeZonesByCountry_structuresAreImmutable()
444 TimeZone noDstMatch1 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate()
448 TimeZone noDstMatch2 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate()
452 TimeZone noDstMatch3 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate()
456 TimeZone noDstMatch4 = finder.lookupTimeZoneByCountryAndOffset("xx", in lookupTimeZoneByCountryAndOffset_oneCandidate()
[all …]
/libcore/ojluni/src/main/java/sun/util/calendar/
DGregorian.java28 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/
DDateIntervalFormat.java23 import java.util.TimeZone;
46 TimeZone tz = (olsonId != null) ? TimeZone.getTimeZone(olsonId) : TimeZone.getDefault(); in formatDateRange()
47 android.icu.util.TimeZone icuTimeZone = DateUtilsBridge.icuTimeZone(tz); in formatDateRange()
54 public static String formatDateRange(ULocale icuLocale, android.icu.util.TimeZone icuTimeZone, in formatDateRange()
86 android.icu.util.TimeZone icuTimeZone) { in getFormatter()
/libcore/luni/src/main/java/libcore/util/
DTimeZoneFinder.java23 import android.icu.util.TimeZone;
59 private List<TimeZone> lastCountryTimeZones;
136 public TimeZone lookupTimeZoneByCountryAndOffset( in lookupTimeZoneByCountryAndOffset()
137 String countryIso, int offsetSeconds, boolean isDst, long whenMillis, TimeZone bias) { in lookupTimeZoneByCountryAndOffset()
139 List<TimeZone> candidates = lookupTimeZonesByCountry(countryIso); in lookupTimeZoneByCountryAndOffset()
144 TimeZone firstMatch = null; in lookupTimeZoneByCountryAndOffset()
146 TimeZone match = candidates.get(i); in lookupTimeZoneByCountryAndOffset()
175 private static boolean offsetMatchesAtTime(TimeZone timeZone, int offsetMillis, boolean isDst, in offsetMatchesAtTime()
194 public List<TimeZone> lookupTimeZonesByCountry(String countryIso) { in lookupTimeZonesByCountry()
202 List<TimeZone> countryTimeZones = null; in lookupTimeZonesByCountry()
[all …]
/libcore/luni/src/test/java/libcore/icu/
DDateIntervalFormatTest.java20 import android.icu.util.TimeZone;
35 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_formatDateInterval()
173 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test8862241()
187 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10089890()
188 TimeZone pacific = TimeZone.getTimeZone("America/Los_Angeles"); in test10089890()
209 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10318326()
236 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10560853_when_time_not_displayed()
260 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10560853_for_single_day_events()
272 TimeZone utc = TimeZone.getTimeZone("UTC"); in test_single_day_events_later_than_epoch()
290 TimeZone pacific = TimeZone.getTimeZone("America/Los_Angeles"); in test_single_day_events_not_in_UTC()
[all …]
DRelativeDateTimeFormatterTest.java21 import java.util.TimeZone;
42 TimeZone tz = TimeZone.getTimeZone("GMT"); in test_getRelativeTimeSpanStringCTS()
98 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getRelativeTimeSpanString_helper()
355 TimeZone tz = TimeZone.getTimeZone("Europe/Berlin"); in test_getRelativeTimeSpanStringGerman()
383 TimeZone tz = TimeZone.getTimeZone("Europe/Paris"); in test_getRelativeTimeSpanStringFrench()
412 TimeZone tz = TimeZone.getDefault(); in test_getRelativeDateTimeStringCTS()
423 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getRelativeDateTimeString()
467 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getRelativeDateTimeStringDST()
512 TimeZone tz = TimeZone.getTimeZone("Europe/Rome"); in test_getRelativeDateTimeStringItalian()
541 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test5252772()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DSimpleDateFormatTest.java28 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");
162 TimeZone tz = AMERICA_LOS_ANGELES; in testFiveCount_Z()
204 private String formatDate(Locale l, String fmt, TimeZone tz) { in formatDate()
227 private static Calendar parseDate(Locale l, String fmt, String value, TimeZone tz) { in parseDate()
266 TimeZone europeBerlin = TimeZone.getTimeZone("Europe/Berlin"); in testFormattingUncommonTimeZoneAbbreviations()
267 TimeZone europeZurich = TimeZone.getTimeZone("Europe/Zurich"); in testFormattingUncommonTimeZoneAbbreviations()
289 TimeZone americaChicago = TimeZone.getTimeZone("America/Chicago"); in testTimeZoneFormatting()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DZipEntryTest.java24 import java.util.TimeZone;
371 TimeZone zone = TimeZone.getDefault(); in test_setTimeJ()
376 TimeZone.setDefault(TimeZone.getTimeZone("EST")); in test_setTimeJ()
380 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in test_setTimeJ()
384 TimeZone.setDefault(TimeZone.getTimeZone("EST")); in test_setTimeJ()
395 TimeZone.setDefault(zone); in test_setTimeJ()

1234