/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 110 for (ChronoZonedDateTime<?> zdt : zdts) { in test() 111 zdt = zdt.with(ChronoField.DAY_OF_YEAR, (r.nextInt(365) + 1)) in test() 113 Instant instant = zdt.toInstant(); in test() 116 TimeZone tz = TimeZone.getTimeZone(zdt.getZone()); in test() 126 testDate(fmtStr, locale, zdt, cal); in test() 129 testTime(fmtStr, locale, zdt, cal); in test() 131 testZoneId(locale, zdt, cal); in test() 132 testInstant(locale, instant, zdt, cal); in test() 225 ChronoZonedDateTime<?> zdt, Calendar cal) { in testDate() argument 228 test(fmtStr, locale, expected, zdt); in testDate() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestZoneTextPrinterParser.java | 77 ZonedDateTime zdt = ZonedDateTime.now(); in test_printText() local 81 zdt = zdt.withDayOfYear(r.nextInt(365) + 1) in test_printText() 118 zdt = zdt.withZoneSameLocal(ZoneId.of(zid)); in test_printText() 124 boolean isDST = tz.inDaylightTime(new Date(zdt.toInstant().toEpochMilli())); in test_printText() 125 printText(locale, zdt, TextStyle.FULL, tz, in test_printText() 127 printText(locale, zdt, TextStyle.SHORT, tz, in test_printText() 148 …private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String ex… in printText() argument 149 String result = getFormatter(locale, style).format(zdt); in printText() 159 System.out.printf("tdz[%s]%n", zdt.toString()); in printText()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKOffsetPrinterParser.java | 474 ZonedDateTime zdt = ldt.atZone(zone); in test_print() local 476 String output = builder.toFormatter().format(zdt); in test_print() 496 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_X() local 498 String output = builder.toFormatter().format(zdt); in test_print_pattern_X() 524 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_x() local 526 String output = builder.toFormatter().format(zdt); in test_print_pattern_x() 535 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_Z() local 537 String output1 = f1.format(zdt); in test_print_pattern_Z() 541 String output2 = f2.format(zdt); in test_print_pattern_Z() 545 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 | 1066 ZonedDateTime zdt = ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, EUROPE_PARIS); in test_fieldResolvesToChronoZonedDateTime_noOverrideChrono_matches() local 1067 …DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(new ResolvingField(zdt)).toFormat… in test_fieldResolvesToChronoZonedDateTime_noOverrideChrono_matches() 1105 ZonedDateTime zdt = ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, EUROPE_PARIS); in test_fieldResolvesToChronoZonedDateTime_overrideZone_matches() local 1106 …DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(new ResolvingField(zdt)).toFormat… in test_fieldResolvesToChronoZonedDateTime_overrideZone_matches() 1108 assertEquals(f.parse("1234567890", ZonedDateTime::from), zdt); in test_fieldResolvesToChronoZonedDateTime_overrideZone_matches() 1113 ZonedDateTime zdt = ZonedDateTime.of(2010, 6, 30, 12, 30, 0, 0, EUROPE_PARIS); in test_fieldResolvesToChronoZonedDateTime_overrideZone_wrongZone() local 1114 …DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(new ResolvingField(zdt)).toFormat… in test_fieldResolvesToChronoZonedDateTime_overrideZone_wrongZone()
|
D | TCKDateTimeFormatterBuilder.java | 596 ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.now(), ZoneId.of(input)); in test_appendZoneText_formatGenericTimeZonePatterns() local 598 assertEquals(zdt.format(df), expected); in test_appendZoneText_formatGenericTimeZonePatterns() 645 ZonedDateTime zdt = ZonedDateTime.of(ldt, zId); in test_appendZoneText_parseNonGenricTimeZonePatterns_1() local 646 String actual = df.format(zdt); in test_appendZoneText_parseNonGenricTimeZonePatterns_1()
|
/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 | 288 ZonedDateTime zdt = createZDT(1840, 1, 1, ZoneOffset.UTC); in test_London_getStandardOffset() local 289 while (zdt.getYear() < 2010) { in test_London_getStandardOffset() 290 Instant instant = zdt.toInstant(); in test_London_getStandardOffset() 291 if (zdt.getYear() < 1848) { in test_London_getStandardOffset() 293 } else if (zdt.getYear() >= 1969 && zdt.getYear() < 1972) { in test_London_getStandardOffset() 298 zdt = zdt.plusMonths(6); in test_London_getStandardOffset() 684 ZonedDateTime zdt = createZDT(1840, 1, 1, ZoneOffset.UTC); in test_Paris_getStandardOffset() local 685 while (zdt.getYear() < 2010) { in test_Paris_getStandardOffset() 686 Instant instant = zdt.toInstant(); in test_Paris_getStandardOffset() 687 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 | 1209 ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); 1210 ZonedDateTime test = zdt.with(odt); 1218 ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); 1219 ZonedDateTime test = zdt.with(odt); 1221 assertEquals(test.getOffset(), zdt.getOffset()); 1228 ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS); 1229 ZonedDateTime test = zdt.with(odt); 1237 ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS); 1238 ZonedDateTime test = zdt.with(odt); 1246 ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); [all …]
|
D | TCKOffsetDateTime.java | 1179 ZonedDateTime zdt = odt.plusSeconds(3).toZonedDateTime(); 1180 assertEquals(odt.until(zdt, SECONDS), 3);
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | Parsed.java | 358 ChronoZonedDateTime<?> zdt = chrono.zonedDateTime(instant, selectedZone); in resolveInstantFields0() local 359 updateCheckConflict(zdt.toLocalDate()); in resolveInstantFields0() 360 … updateCheckConflict(INSTANT_SECONDS, SECOND_OF_DAY, (long) zdt.toLocalTime().toSecondOfDay()); in resolveInstantFields0() 361 … updateCheckConflict(INSTANT_SECONDS, OFFSET_SECONDS, (long) zdt.getOffset().getTotalSeconds()); in resolveInstantFields0()
|
/libcore/ojluni/src/main/java/java/util/ |
D | GregorianCalendar.java | 3417 public static GregorianCalendar from(ZonedDateTime zdt) { in from() argument 3418 GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone(zdt.getZone())); in from() 3423 cal.setTimeInMillis(Math.addExact(Math.multiplyExact(zdt.toEpochSecond(), 1000), in from() 3424 zdt.get(ChronoField.MILLI_OF_SECOND))); in from()
|