Home
last modified time | relevance | path

Searched refs:zoneId (Results 1 – 25 of 46) sorted by relevance

12

/libcore/ojluni/src/main/java/java/time/zone/
DZoneRulesProvider.java181 public static ZoneRules getRules(String zoneId, boolean forCaching) { in getRules() argument
182 Objects.requireNonNull(zoneId, "zoneId"); in getRules()
183 return getProvider(zoneId).provideRules(zoneId, forCaching); in getRules()
210 public static NavigableMap<String, ZoneRules> getVersions(String zoneId) { in getVersions() argument
211 Objects.requireNonNull(zoneId, "zoneId"); in getVersions()
212 return getProvider(zoneId).provideVersions(zoneId); in getVersions()
222 private static ZoneRulesProvider getProvider(String zoneId) { in getProvider() argument
223 ZoneRulesProvider provider = ZONES.get(zoneId); in getProvider()
228 throw new ZoneRulesException("Unknown time-zone ID: " + zoneId); in getProvider()
262 for (String zoneId : provider.provideZoneIds()) { in registerProvider0()
[all …]
DIcuZoneRulesProvider.java71 protected ZoneRules provideRules(String zoneId, boolean forCaching) { in provideRules() argument
73 return cache.get(zoneId); in provideRules()
77 protected NavigableMap<String, ZoneRules> provideVersions(String zoneId) { in provideVersions() argument
80 provideRules(zoneId, /* forCaching */ false))); in provideVersions()
104 static ZoneRules generateZoneRules(String zoneId) { in generateZoneRules() argument
105 TimeZone timeZone = TimeZone.getFrozenTimeZone(zoneId); in generateZoneRules()
107 verify(timeZone instanceof BasicTimeZone, zoneId, in generateZoneRules()
155 verify(hadEffect, zoneId, "Transition changed neither total nor raw offset."); in generateZoneRules()
162 verify(last1.getEndYear() == AnnualTimeZoneRule.MAX_YEAR, zoneId, in generateZoneRules() local
167 verify(last2.getEndYear() == AnnualTimeZoneRule.MAX_YEAR, zoneId, in generateZoneRules() local
[all …]
/libcore/ojluni/src/main/java/java/time/
DZoneId.java305 public static ZoneId of(String zoneId, Map<String, String> aliasMap) { in of() argument
306 Objects.requireNonNull(zoneId, "zoneId"); in of()
308 String id = aliasMap.get(zoneId); in of()
309 id = (id != null ? id : zoneId); in of()
353 public static ZoneId of(String zoneId) { in of() argument
354 return of(zoneId, true); in of()
397 static ZoneId of(String zoneId, boolean checkAvailable) { in of() argument
398 Objects.requireNonNull(zoneId, "zoneId"); in of()
399 if (zoneId.length() <= 1 || zoneId.startsWith("+") || zoneId.startsWith("-")) { in of()
400 return ZoneOffset.of(zoneId); in of()
[all …]
DZoneRegion.java114 static ZoneRegion ofId(String zoneId, boolean checkAvailable) { in ofId() argument
115 Objects.requireNonNull(zoneId, "zoneId"); in ofId()
116 checkName(zoneId); in ofId()
120 rules = ZoneRulesProvider.getRules(zoneId, true); in ofId()
126 return new ZoneRegion(zoneId, rules); in ofId()
135 private static void checkName(String zoneId) { in checkName() argument
136 int n = zoneId.length(); in checkName()
138 … throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId); in checkName()
141 char c = zoneId.charAt(i); in checkName()
151 … throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId); in checkName()
/libcore/luni/src/test/java/libcore/java/time/zone/
DIcuZoneRulesProviderTest.java56 private final String zoneId; field in IcuZoneRulesProviderTest
58 public IcuZoneRulesProviderTest(final String zoneId) { in IcuZoneRulesProviderTest() argument
59 this.zoneId = zoneId; in IcuZoneRulesProviderTest()
84 ZoneRules rules = ZoneRulesProvider.getRules(zoneId, false); in testTransitionsNearInstants()
85 BasicTimeZone timeZone = (BasicTimeZone) TimeZone.getTimeZone(zoneId); in testTransitionsNearInstants()
93 assertEquals("total offset for " + zoneId + " at " + instant, in testTransitionsNearInstants()
95 assertEquals("dst offset for " + zoneId + " at " + instant, in testTransitionsNearInstants()
130 ZoneRules rules = ZoneRulesProvider.getRules(zoneId, false); in testAllTransitions()
131 BasicTimeZone timeZone = (BasicTimeZone) TimeZone.getTimeZone(zoneId); in testAllTransitions()
/libcore/luni/src/test/java/libcore/java/time/format/
DDateTimeFormatterBuilderTest.java79 formatter.parse("Europe/London").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
81 formatter.parse("UTC").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
83 formatter.parse("GMT+01:00").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
87 formatter.parse("UTC+01:00").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
90 formatter.parse("+01:00").query(TemporalQueries.zoneId())); in test_appendZoneRegionId_parse()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRulesProvider.java191 protected NavigableMap<String, ZoneRules> provideVersions(String zoneId) { in provideVersions() argument
197 protected ZoneRules provideRules(String zoneId, boolean forCaching) { in provideRules() argument
198 if (zoneId.equals("FooLocation")) { in provideRules()
214 protected NavigableMap<String, ZoneRules> provideVersions(String zoneId) { in provideVersions() argument
223 protected ZoneRules provideRules(String zoneId, boolean forCaching) { in provideRules() argument
225 if (zoneId.equals("DynamicLocation")) { in provideRules()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeFormatters.java227 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_print_isoLocalDate() argument
229 … TemporalAccessor test = buildAccessor(year, month, day, null, null, null, null, offsetId, zoneId); in test_print_isoLocalDate()
244 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_parse_isoLocalDate() argument
321 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_print_isoOffsetDate() argument
323 … TemporalAccessor test = buildAccessor(year, month, day, null, null, null, null, offsetId, zoneId); in test_print_isoOffsetDate()
338 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_parse_isoOffsetDate() argument
379 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_print_isoDate() argument
381 … TemporalAccessor test = buildAccessor(year, month, day, null, null, null, null, offsetId, zoneId); in test_print_isoDate()
396 Integer year, Integer month, Integer day, String offsetId, String zoneId, in test_parse_isoDate() argument
451 Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, in test_print_isoLocalTime() argument
[all …]
DTCKZoneIdPrinterParser.java217 …assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + text… in test_parseSuccess_plain()
234 …assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + pref… in test_parseSuccess_prefix()
250 …assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + suff… in test_parseSuccess_suffix()
272 assertEquals(parsed.query(TemporalQueries.zoneId()), expected); in test_parseSuccess_caseSensitive()
289 ZoneId zid = parsed.query(TemporalQueries.zoneId()); in test_parseSuccess_caseInsensitive()
290 …assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + lcTe… in test_parseSuccess_caseInsensitive()
/libcore/ojluni/annotations/hiddenapi/java/time/
DZoneId.java83 java.lang.String zoneId, java.util.Map<java.lang.String, java.lang.String> aliasMap) { in of() argument
87 public static java.time.ZoneId of(java.lang.String zoneId) { in of() argument
96 static java.time.ZoneId of(java.lang.String zoneId, boolean checkAvailable) { in of() argument
101 java.lang.String zoneId, int prefixLength, boolean checkAvailable) { in ofWithPrefix() argument
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKHijrahChronology.java117 ZoneId zoneId = ZoneId.of("Europe/Paris"); in test_dateNow() local
118 …sertEquals(HijrahChronology.INSTANCE.dateNow(zoneId), HijrahChronology.INSTANCE.dateNow(Clock.syst… in test_dateNow()
119 …sertEquals(HijrahChronology.INSTANCE.dateNow(zoneId), HijrahChronology.INSTANCE.dateNow(Clock.syst… in test_dateNow()
120 … assertEquals(HijrahChronology.INSTANCE.dateNow(zoneId), HijrahDate.now(Clock.system(zoneId))) ; in test_dateNow()
121 …assertEquals(HijrahChronology.INSTANCE.dateNow(zoneId), HijrahDate.now(Clock.system(zoneId).getZon… in test_dateNow()
DTCKThaiBuddhistChronology.java233 ZoneId zoneId = ZoneId.of("Europe/Paris"); in test_dateNow() local
234 …s(ThaiBuddhistChronology.INSTANCE.dateNow(zoneId), ThaiBuddhistChronology.INSTANCE.dateNow(Clock.s… in test_dateNow()
235 …s(ThaiBuddhistChronology.INSTANCE.dateNow(zoneId), ThaiBuddhistChronology.INSTANCE.dateNow(Clock.s… in test_dateNow()
236 …ssertEquals(ThaiBuddhistChronology.INSTANCE.dateNow(zoneId), ThaiBuddhistDate.now(Clock.system(zon… in test_dateNow()
237 …ssertEquals(ThaiBuddhistChronology.INSTANCE.dateNow(zoneId), ThaiBuddhistDate.now(Clock.system(zon… in test_dateNow()
DTCKMinguoChronology.java196 ZoneId zoneId = ZoneId.of("Europe/Paris"); in test_dateNow() local
197 …sertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.syst… in test_dateNow()
198 …sertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.syst… in test_dateNow()
199 … assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId))) ; in test_dateNow()
200 …assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId).getZon… in test_dateNow()
DTCKJapaneseChronology.java327 ZoneId zoneId = ZoneId.of("Europe/Paris"); in test_dateNow() local
328 …tEquals(JapaneseChronology.INSTANCE.dateNow(zoneId), JapaneseChronology.INSTANCE.dateNow(Clock.sys… in test_dateNow()
329 …tEquals(JapaneseChronology.INSTANCE.dateNow(zoneId), JapaneseChronology.INSTANCE.dateNow(Clock.sys… in test_dateNow()
330 …assertEquals(JapaneseChronology.INSTANCE.dateNow(zoneId), JapaneseDate.now(Clock.system(zoneId))) ; in test_dateNow()
331 …assertEquals(JapaneseChronology.INSTANCE.dateNow(zoneId), JapaneseDate.now(Clock.system(zoneId).ge… in test_dateNow()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestNumberParser.java182 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parse_fresh()
202 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parse_textField()
317 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parseSignsStrict()
427 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parseSignsLenient()
518 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parseDigitsLenient()
556 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parseDigitsAdjacentLenient()
DTestCharLiteralParser.java115 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parse_success()
DTestStringLiteralParser.java118 assertEquals(parsed.query(TemporalQueries.zoneId()), null); in test_parse_success()
/libcore/ojluni/src/main/java/java/time/temporal/
DTemporalAccessor.java309 if (query == TemporalQueries.zoneId() in query()
DTemporalQueries.java167 public static TemporalQuery<ZoneId> zoneId() { in zoneId() method in TemporalQueries
/libcore/ojluni/src/main/java/java/time/format/
DDateTimePrintContext.java133 ZoneId temporalZone = temporal.query(TemporalQueries.zoneId()); in adjust()
213 if (query == TemporalQueries.zoneId()) { in adjust()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKZoneId.java338 ZoneId zoneId = ZoneId.ofOffset(prefix, zoff); in test_prefixOfOffset() local
339 …assertEquals(zoneId.getId(), prefix + zoff.getId(), "in correct id for : " + prefix + ", zoff: " +… in test_prefixOfOffset()
357 ZoneId zoneId = ZoneId.ofOffset(prefix, zoff); in test_invalidPrefixOfOffset() local
523 if (query == TemporalQueries.zoneId()) { in factory_from_TemporalAccessor_zoneId()
DTCKZoneOffset.java528 {ZoneOffset.UTC, TemporalQueries.zoneId(), null}, in data_query()
591 for (String zoneId : ZoneId.getAvailableZoneIds()) {
593 …e_target = ZonedDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10, 10, 10), ZoneId.of(zoneId));
DTCKZonedDateTime.java689 if (query == TemporalQueries.zoneId()) {
713 if (query == TemporalQueries.zoneId()) {
735 …public void test_parse(int y, int month, int d, int h, int m, int s, int n, String zoneId, String …
744 assertEquals(t.getZone().getId(), zoneId);
767 …_parseAdditional(String text, int y, int month, int d, int h, int m, int s, int n, String zoneId) {
776 assertEquals(t.getZone().getId(), zoneId);
974 assertEquals(TEST_DATE_TIME.query(TemporalQueries.zoneId()), TEST_DATE_TIME.getZone());
975 assertEquals(TemporalQueries.zoneId().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone());
2403 …public void test_toString(int y, int o, int d, int h, int m, int s, int n, String zoneId, String e…
2404 ZonedDateTime t = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZoneId.of(zoneId));
[all …]
/libcore/ojluni/src/main/java/java/util/
DTimeZone.java601 public static TimeZone getTimeZone(ZoneId zoneId) { in getTimeZone() argument
602 String tzid = zoneId.getId(); // throws an NPE if null in getTimeZone()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDate.java508 …if (query == TemporalQueries.zoneId() || query == TemporalQueries.zone() || query == TemporalQueri… in query()

12