Home
last modified time | relevance | path

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

123

/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.java24 import java.util.TimeZone;
316 cal.setTimeZone(TimeZone.getTimeZone("GMT")); in test_parseLjava_lang_String()
321 cal.setTimeZone(TimeZone.getTimeZone("MST")); in test_parseLjava_lang_String()
326 cal.setTimeZone(TimeZone.getTimeZone("GMT")); in test_parseLjava_lang_String()
455 TimeZone tz = TimeZone.getDefault(); in test_toString()
456 TimeZone.setDefault(TimeZone.getTimeZone("GMT-5")); in test_toString()
462 TimeZone.setDefault(tz); in test_toString()
466 TimeZone.setDefault(TimeZone.getTimeZone("MST")); in test_toString()
490 TimeZone tz = TimeZone.getDefault(); in test_toLocaleString()
491 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");
56 TimeZone.getDefault())); in test_ConstructorIII()
79 TimeZone.getDefault())); in test_ConstructorIIIII()
110 TimeZone.getDefault())); in test_ConstructorIIIIII()
135 TimeZone.getDefault(); in test_ConstructorLjava_util_TimeZone()
150 Calendar c1 = new GregorianCalendar(TimeZone.getTimeZone("GMT")); in test_ConstructorLjava_util_TimeZone()
170 TimeZone.getDefault(); in test_ConstructorLjava_util_TimeZoneLjava_util_Locale()
326 String[] ids = TimeZone.getAvailableIDs(); in test_getActualMaximumI()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DOldTimeZoneTest.java23 import java.util.TimeZone;
28 static class Mock_TimeZone extends TimeZone {
60 TimeZone tz1 = TimeZone.getDefault(); in test_clone()
61 TimeZone tz2 = (TimeZone)tz1.clone(); in test_clone()
67 String[] str = TimeZone.getAvailableIDs(); in test_getAvailableIDs()
71 assertNotNull(TimeZone.getTimeZone(str[i])); in test_getAvailableIDs()
76 String[] str = TimeZone.getAvailableIDs(0); in test_getAvailableIDsI()
80 assertNotNull(TimeZone.getTimeZone(str[i])); in test_getAvailableIDsI()
86 TimeZone tz = TimeZone.getTimeZone("GMT-6"); in test_getDisplayName()
88 tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_getDisplayName()
[all …]
DTimeZoneTest.java24 import java.util.TimeZone;
30 TimeZone asiaTaipei = TimeZone.getTimeZone("Asia/Taipei"); in test_useDaylightTime_Taiwan()
36 TimeZone atlanticReykjavik = TimeZone.getTimeZone("Atlantic/Reykjavik"); in test_useDaylightTime_Iceland()
50 TimeZone tz0001 = new SimpleTimeZone(60000, "ONE MINUTE"); in testCustomTimeZoneDisplayNames()
51 TimeZone tz0130 = new SimpleTimeZone(5400000, "ONE HOUR, THIRTY"); in testCustomTimeZoneDisplayNames()
52 TimeZone tzMinus0130 = new SimpleTimeZone(-5400000, "NEG ONE HOUR, THIRTY"); in testCustomTimeZoneDisplayNames()
53 assertEquals("GMT+00:01", tz0001.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames()
54 assertEquals("GMT+01:30", tz0130.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames()
55 assertEquals("GMT-01:30", tzMinus0130.getDisplayName(false, TimeZone.SHORT, Locale.US)); in testCustomTimeZoneDisplayNames()
61 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in testPreHistoricInDaylightTime()
[all …]
DDateTest.java22 import java.util.TimeZone;
30 TimeZone.setDefault(TimeZone.getTimeZone("America/Chicago")); in test_toString_us()
38 TimeZone.setDefault(TimeZone.getTimeZone("America/Chicago")); in test_toString_nonUs()
44 TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); in test_toGMTString_us()
58 TimeZone.setDefault(TimeZone.getTimeZone("America/Los_Angeles")); in test_toGMTString_nonUs()
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.java23 import java.util.TimeZone;
28 private static final TimeZone AMERICA_SAO_PAULO = TimeZone.getTimeZone("America/Sao_Paulo");
31 private static final TimeZone AUSTRALIA_LORD_HOWE = TimeZone.getTimeZone("Australia/Lord_Howe");
38 private static final TimeZone ASIA_KUALA_LUMPUR = TimeZone.getTimeZone("Asia/Kuala_Lumpur");
40 private static final TimeZone ASIA_SEOUL = TimeZone.getTimeZone("Asia/Seoul");
46 Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"), Locale.US); in test_setTimeZone()
48 TimeZone tz = java.util.TimeZone.getTimeZone("GMT+7"); in test_setTimeZone()
147 private void testSetSelfConsistent(TimeZone timeZone, int year, int month, int day) { in testSetSelfConsistent()
190 calendar.setTimeZone(TimeZone.getTimeZone("GMT-08:00")); in testCalendarSerialization()
214 GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles")); in test_clear_45877()
[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()
DFormatterTest.java23 import java.util.TimeZone;
44 Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT-08:00")); in test_numberLocalization()
166 TimeZone utc = TimeZone.getTimeZone("UTC"); in checkFormat()
/libcore/benchmarks/src/benchmarks/regression/
DTimeZoneBenchmark.java20 import java.util.TimeZone;
25 TimeZone.getDefault(); in timeTimeZone_getDefault()
31 TimeZone.getTimeZone("UTC"); in timeTimeZone_getTimeZoneUTC()
36 String defaultId = TimeZone.getDefault().getID(); in timeTimeZone_getTimeZone_default()
38 TimeZone.getTimeZone(defaultId); in timeTimeZone_getTimeZone_default()
45 TimeZone.getTimeZone("America/Caracas"); in timeTimeZone_getTimeZone_America_Caracas()
52 TimeZone.getTimeZone("America/Santiago"); in timeTimeZone_getTimeZone_America_Santiago()
58 TimeZone.getTimeZone("GMT+10"); in timeTimeZone_getTimeZone_GMT_plus_10()
DDateIntervalFormatBenchmark.java22 import java.util.TimeZone;
29 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeDateIntervalFormat_formatDateRange_DATE()
39 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeDateIntervalFormat_formatDateRange_TIME()
49 TimeZone utc = TimeZone.getTimeZone("UTC"); in timeDateIntervalFormat_formatDateRange_DATE_TIME()
/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/main/java/java/util/
DTimeZone.java68 public abstract class TimeZone implements Serializable, Cloneable { class
85 private static final TimeZone GMT = new SimpleTimeZone(0, "GMT");
86 private static final TimeZone UTC = new SimpleTimeZone(0, "UTC");
88 private static TimeZone defaultTimeZone;
92 public TimeZone() {} in TimeZone() method in TimeZone
133 public static synchronized TimeZone getDefault() { in getDefault()
150 defaultTimeZone = TimeZone.getTimeZone(zoneName); in getDefault()
152 return (TimeZone) defaultTimeZone.clone(); in getDefault()
347 public static synchronized TimeZone getTimeZone(String id) { in getTimeZone()
355 return (TimeZone) GMT.clone(); in getTimeZone()
[all …]
DCalendar.java344 private TimeZone zone;
714 this(TimeZone.getDefault(), Locale.getDefault()); in Calendar()
717 Calendar(TimeZone timezone) { in Calendar()
728 protected Calendar(TimeZone timezone, Locale locale) { in Calendar()
821 clone.zone = (TimeZone) zone.clone(); in clone()
987 public static synchronized Calendar getInstance(TimeZone timezone) { in getInstance()
995 public static synchronized Calendar getInstance(TimeZone timezone, Locale locale) { in getInstance()
1055 public TimeZone getTimeZone() { in getTimeZone()
1214 public void setTimeZone(TimeZone timezone) { in setTimeZone()
1375 new ObjectStreamField("zone", TimeZone.class),
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DSimpleDateFormatTest.java26 import java.util.TimeZone;
30 private static final TimeZone AMERICA_LOS_ANGELES = TimeZone.getTimeZone("America/Los_Angeles");
31 private static final TimeZone AUSTRALIA_LORD_HOWE = TimeZone.getTimeZone("Australia/Lord_Howe");
54 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in testStandAloneNames()
94 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in testFiveCount_M()
105 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in testFiveCount_L()
116 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in testFiveCount_E()
128 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in testFiveCount_c()
140 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in testFiveCount_Z()
151 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in test_parsing_Z()
[all …]
/libcore/luni/src/main/java/java/text/
DDateFormatSymbols.java26 import java.util.TimeZone;
329 zone[1] = TimeZone.getTimeZone(id).getDisplayName(false, TimeZone.LONG, locale); in getZoneStrings()
332 zone[2] = TimeZone.getTimeZone(id).getDisplayName(false, TimeZone.SHORT, locale); in getZoneStrings()
335 zone[3] = TimeZone.getTimeZone(id).getDisplayName(true, TimeZone.LONG, locale); in getZoneStrings()
338 zone[4] = TimeZone.getTimeZone(id).getDisplayName(true, TimeZone.SHORT, locale); in getZoneStrings()
500 String getTimeZoneDisplayName(TimeZone tz, boolean daylight, int style) { in getTimeZoneDisplayName()
501 if (style != TimeZone.SHORT && style != TimeZone.LONG) { in getTimeZoneDisplayName()
/libcore/luni/src/test/java/libcore/icu/
DDateIntervalFormatTest.java21 import java.util.TimeZone;
33 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test_formatDateInterval()
171 TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); in test8862241()
185 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10089890()
186 TimeZone pacific = TimeZone.getTimeZone("America/Los_Angeles"); in test10089890()
207 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10318326()
234 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10560853_when_time_not_displayed()
258 TimeZone utc = TimeZone.getTimeZone("UTC"); in test10560853_for_single_day_events()
270 TimeZone utc = TimeZone.getTimeZone("UTC"); in test_single_day_events_later_than_epoch()
288 TimeZone pacific = TimeZone.getTimeZone("America/Los_Angeles"); in test_single_day_events_not_in_UTC()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DZipEntryTest.java23 import java.util.TimeZone;
342 TimeZone zone = TimeZone.getDefault(); in test_setTimeJ()
344 TimeZone.setDefault(TimeZone.getTimeZone("EST")); in test_setTimeJ()
348 TimeZone.setDefault(TimeZone.getTimeZone("GMT")); in test_setTimeJ()
352 TimeZone.setDefault(TimeZone.getTimeZone("EST")); in test_setTimeJ()
363 TimeZone.setDefault(zone); in test_setTimeJ()
/libcore/support/src/test/java/tests/support/
DSupport_TimeZone.java22 import java.util.TimeZone;
28 public class Support_TimeZone extends TimeZone {
/libcore/luni/src/main/java/libcore/net/http/
DHttpDate.java24 import java.util.TimeZone;
39 rfc1123.setTimeZone(TimeZone.getTimeZone("UTC"));
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/
DASN1Time.java28 import java.util.TimeZone;
44 GregorianCalendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT")); in getDecodedObject()
/libcore/luni/src/main/java/javax/xml/datatype/
DXMLGregorianCalendar.java25 import java.util.TimeZone;
1009 java.util.TimeZone timezone, in toGregorianCalendar()
1029 public abstract TimeZone getTimeZone(int defaultZoneoffset); in getTimeZone()
/libcore/luni/src/main/java/libcore/icu/
DTimeZoneNames.java24 import java.util.TimeZone;
32 private static final String[] availableTimeZoneIds = TimeZone.getAvailableIDs();
119 return (style == TimeZone.LONG) ? row[LONG_NAME_DST] : row[SHORT_NAME_DST]; in getDisplayName()
121 return (style == TimeZone.LONG) ? row[LONG_NAME] : row[SHORT_NAME]; in getDisplayName()

123