/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 105 for (ChronoZonedDateTime<?> zdt : zdts) { in test() 106 zdt = zdt.with(ChronoField.DAY_OF_YEAR, (r.nextInt(365) + 1)) in test() 108 Instant instant = zdt.toInstant(); in test() 111 TimeZone tz = TimeZone.getTimeZone(zdt.getZone()); in test() 121 testDate(fmtStr, locale, zdt, cal); in test() 124 testTime(fmtStr, locale, zdt, cal); in test() 126 testZoneId(locale, zdt, cal); in test() 127 testInstant(locale, instant, zdt, cal); in test() 182 ChronoZonedDateTime<?> zdt, Calendar cal) { in testDate() argument 185 test(fmtStr, locale, expected, zdt); in testDate() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKOffsetPrinterParser.java | 235 ZonedDateTime zdt = ldt.atZone(zone); in test_print() local 237 String output = builder.toFormatter().format(zdt); in test_print() 257 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_X() local 259 String output = builder.toFormatter().format(zdt); in test_print_pattern_X() 285 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_x() local 287 String output = builder.toFormatter().format(zdt); in test_print_pattern_x() 296 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_Z() local 298 String output1 = f1.format(zdt); in test_print_pattern_Z() 302 String output2 = f2.format(zdt); in test_print_pattern_Z() 306 String output3 = f3.format(zdt); in test_print_pattern_Z() [all …]
|
D | TCKZoneIdPrinterParser.java | 116 ZonedDateTime zdt = ldt.atZone(zone); in test_print() local 118 String output = builder.toFormatter().format(zdt); in test_print() 124 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_VV() local 126 String output = builder.toFormatter().format(zdt); in test_print_pattern_VV()
|
D | TCKDateTimeFormatter.java | 284 ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS); in data_format_withZone_withChronology() local 285 …ChronoZonedDateTime<ThaiBuddhistDate> thaiZdt = ThaiBuddhistChronology.INSTANCE.zonedDateTime(zdt); in data_format_withZone_withChronology() 295 {null, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, in data_format_withZone_withChronology() 305 {IsoChronology.INSTANCE, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, in data_format_withZone_withChronology() 315 {null, ZONE_PARIS, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, in data_format_withZone_withChronology() 325 {null, OFFSET_PTHREE, zdt, "2008:12:+03:00:+03:00:ISO"}, in data_format_withZone_withChronology() 335 … {ThaiBuddhistChronology.INSTANCE, null, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, in data_format_withZone_withChronology() 345 … {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, in data_format_withZone_withChronology()
|
D | TCKDateTimeParseResolver.java | 1062 ZonedDateTime zdt = ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, EUROPE_PARIS); in test_fieldResolvesToChronoZonedDateTime_noOverrideChrono_matches() local 1063 …DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(new ResolvingField(zdt)).toFormat… in test_fieldResolvesToChronoZonedDateTime_noOverrideChrono_matches() 1101 ZonedDateTime zdt = ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, EUROPE_PARIS); in test_fieldResolvesToChronoZonedDateTime_overrideZone_matches() local 1102 …DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(new ResolvingField(zdt)).toFormat… in test_fieldResolvesToChronoZonedDateTime_overrideZone_matches() 1104 assertEquals(f.parse("1234567890", ZonedDateTime::from), zdt); in test_fieldResolvesToChronoZonedDateTime_overrideZone_matches() 1109 ZonedDateTime zdt = ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, EUROPE_PARIS); in test_fieldResolvesToChronoZonedDateTime_overrideZone_wrongZone() local 1110 …DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(new ResolvingField(zdt)).toFormat… in test_fieldResolvesToChronoZonedDateTime_overrideZone_wrongZone()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestZoneTextPrinterParser.java | 75 ZonedDateTime zdt = ZonedDateTime.now(); in test_printText() local 79 zdt = zdt.withDayOfYear(r.nextInt(365) + 1) in test_printText() 97 zdt = zdt.withZoneSameLocal(ZoneId.of(zid)); in test_printText() 103 boolean isDST = tz.inDaylightTime(new Date(zdt.toInstant().toEpochMilli())); in test_printText() 104 printText(locale, zdt, TextStyle.FULL, tz, in test_printText() 106 printText(locale, zdt, TextStyle.SHORT, tz, in test_printText() 113 …private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String ex… in printText() argument 114 String result = getFormatter(locale, style).format(zdt); in printText() 124 System.out.printf("tdz[%s]%n", zdt.toString()); in printText()
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKZonedDateTimeSerialization.java | 117 …ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneId.of("Europ… in test_serialization_format_zoneId() local 118 assertSerializedBySer(zdt, bytes); in test_serialization_format_zoneId() 138 …ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneOffset.ofHou… in test_serialization_format_zoneOffset() local 139 assertSerializedBySer(zdt, bytes); in test_serialization_format_zoneOffset()
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/ |
D | TCKZoneRules.java | 277 ZonedDateTime zdt = createZDT(1840, 1, 1, ZoneOffset.UTC); in test_London_getStandardOffset() local 278 while (zdt.getYear() < 2010) { in test_London_getStandardOffset() 279 Instant instant = zdt.toInstant(); in test_London_getStandardOffset() 280 if (zdt.getYear() < 1848) { in test_London_getStandardOffset() 282 } else if (zdt.getYear() >= 1969 && zdt.getYear() < 1972) { in test_London_getStandardOffset() 287 zdt = zdt.plusMonths(6); in test_London_getStandardOffset() 655 ZonedDateTime zdt = createZDT(1840, 1, 1, ZoneOffset.UTC); in test_Paris_getStandardOffset() local 656 while (zdt.getYear() < 2010) { in test_Paris_getStandardOffset() 657 Instant instant = zdt.toInstant(); in test_Paris_getStandardOffset() 658 if (zdt.toLocalDate().isBefore(LocalDate.of(1911, 3, 11))) { in test_Paris_getStandardOffset() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | GregorianCalendarTest.java | 291 ZonedDateTime zdt = ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"); in test_fromZonedDateTime() local 292 GregorianCalendar calendar = GregorianCalendar.from(zdt); in test_fromZonedDateTime() 323 ZonedDateTime zdt = calendar.toZonedDateTime(); in test_toZonedDateTime() local 324 assertEquals(ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"), zdt); in test_toZonedDateTime()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKZonedDateTime.java | 1214 ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); 1215 ZonedDateTime test = zdt.with(odt); 1223 ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); 1224 ZonedDateTime test = zdt.with(odt); 1226 assertEquals(test.getOffset(), zdt.getOffset()); 1233 ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS); 1234 ZonedDateTime test = zdt.with(odt); 1242 ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS); 1243 ZonedDateTime test = zdt.with(odt); 1251 ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); [all …]
|
D | TCKOffsetDateTime.java | 1194 ZonedDateTime zdt = odt.plusSeconds(3).toZonedDateTime(); 1195 assertEquals(odt.until(zdt, SECONDS), 3);
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | Parsed.java | 344 ChronoZonedDateTime<?> zdt = chrono.zonedDateTime(instant, selectedZone); in resolveInstantFields0() local 345 updateCheckConflict(zdt.toLocalDate()); in resolveInstantFields0() 346 … updateCheckConflict(INSTANT_SECONDS, SECOND_OF_DAY, (long) zdt.toLocalTime().toSecondOfDay()); in resolveInstantFields0()
|
/libcore/ojluni/src/main/java/java/util/ |
D | GregorianCalendar.java | 3455 public static GregorianCalendar from(ZonedDateTime zdt) { in from() argument 3456 GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone(zdt.getZone())); in from() 3461 cal.setTimeInMillis(Math.addExact(Math.multiplyExact(zdt.toEpochSecond(), 1000), in from() 3462 zdt.get(ChronoField.MILLI_OF_SECOND))); in from()
|