Home
last modified time | relevance | path

Searched refs:offsetId (Results 1 – 6 of 6) sorted by relevance

/libcore/ojluni/src/main/java/java/time/
DZoneOffset.java196 public static ZoneOffset of(String offsetId) { in of() argument
197 Objects.requireNonNull(offsetId, "offsetId"); in of()
199 ZoneOffset offset = ID_CACHE.get(offsetId); in of()
206 switch (offsetId.length()) { in of()
208 offsetId = offsetId.charAt(0) + "0" + offsetId.charAt(1); // fallthru in of()
210 hours = parseNumber(offsetId, 1, false); in of()
215 hours = parseNumber(offsetId, 1, false); in of()
216 minutes = parseNumber(offsetId, 3, false); in of()
220 hours = parseNumber(offsetId, 1, false); in of()
221 minutes = parseNumber(offsetId, 4, true); in of()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKZoneId.java278 …ublic void factory_of_String_offsetBasedValid_prefixUTC(String input, String id, String offsetId) { in factory_of_String_offsetBasedValid_prefixUTC() argument
281 assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules()); in factory_of_String_offsetBasedValid_prefixUTC()
282 assertEquals(test.normalized(), ZoneOffset.of(offsetId)); in factory_of_String_offsetBasedValid_prefixUTC()
285 assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId)); in factory_of_String_offsetBasedValid_prefixUTC()
289 …ublic void factory_of_String_offsetBasedValid_prefixGMT(String input, String id, String offsetId) { in factory_of_String_offsetBasedValid_prefixGMT() argument
292 assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules()); in factory_of_String_offsetBasedValid_prefixGMT()
293 assertEquals(test.normalized(), ZoneOffset.of(offsetId)); in factory_of_String_offsetBasedValid_prefixGMT()
296 assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId)); in factory_of_String_offsetBasedValid_prefixGMT()
300 …public void factory_of_String_offsetBasedValid_prefixUT(String input, String id, String offsetId) { in factory_of_String_offsetBasedValid_prefixUT() argument
303 assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules()); in factory_of_String_offsetBasedValid_prefixUT()
[all …]
DTCKOffsetTime.java402 …public void factory_parse_validText(int h, int m, int s, int n, String offsetId, String parsable) {
405 check(t, h, m, s, n, ZoneOffset.of(offsetId));
1434 public void test_toString(int h, int m, int s, int n, String offsetId, String expected) {
1435 OffsetTime t = OffsetTime.of(h, m, s, n, ZoneOffset.of(offsetId));
DTCKOffsetDateTime.java427 …public void test_parse(int y, int month, int d, int h, int m, int s, int n, String offsetId, Strin…
436 assertEquals(t.getOffset().getId(), offsetId);
1609 …public void test_toString(int y, int o, int d, int h, int m, int s, int n, String offsetId, String…
1610 OffsetDateTime t = OffsetDateTime.of(y, o, d, h, m, s, n, ZoneOffset.of(offsetId));
/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
342 buildCalendrical(expected, offsetId, null); // zone not expected to be parsed in test_parse_isoOffsetDate()
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
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKZoneIdSerialization.java134 …ient_offsetNotAllowed_prefixUTC(String input, String resolvedId, String offsetId) throws Exception… in test_deserialization_lenient_offsetNotAllowed_prefixUTC() argument
141 …ient_offsetNotAllowed_prefixGMT(String input, String resolvedId, String offsetId) throws Exception… in test_deserialization_lenient_offsetNotAllowed_prefixGMT() argument
148 …nient_offsetNotAllowed_prefixUT(String input, String resolvedId, String offsetId) throws Exception… in test_deserialization_lenient_offsetNotAllowed_prefixUT() argument