/libcore/luni/src/test/java/libcore/java/time/zone/ |
D | IcuZoneRulesProviderTest.java | 70 LocalDateTime.of(1900, Month.DECEMBER, 24, 12, 0).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 71 LocalDateTime.of(1970, Month.JANUARY, 1, 2, 3).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 72 LocalDateTime.of(1980, Month.FEBRUARY, 4, 5, 6).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 73 LocalDateTime.of(1990, Month.MARCH, 7, 8, 9).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 74 LocalDateTime.of(2000, Month.APRIL, 10, 11, 12).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 75 LocalDateTime.of(2016, Month.MAY, 13, 14, 15).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 76 LocalDateTime.of(2020, Month.JUNE, 16, 17, 18).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 77 LocalDateTime.of(2100, Month.JULY, 19, 20, 21).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants() 124 .toInstant(ZoneOffset.UTC); in testAllTransitions() 128 .toInstant(ZoneOffset.UTC); in testAllTransitions()
|
D | ZoneRulesTest.java | 48 LocalDateTime.MIN.toInstant(offset), in test_of_ZoneOffset() 50 LocalDateTime.of(2000, Month.JANUARY, 1, 1, 1).toInstant(ZoneOffset.UTC), in test_of_ZoneOffset() 52 LocalDateTime.MAX.toInstant(offset), in test_of_ZoneOffset()
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | FileTime.java | 230 public Instant toInstant() { in toInstant() method in FileTime 305 return toInstant().hashCode(); in hashCode() 312 return TimeUnit.SECONDS.toDays(toInstant().getEpochSecond()); in toDays() 320 return TimeUnit.SECONDS.toNanos(toInstant().getEpochSecond() in toExcessNanos() 343 long secs = toInstant().getEpochSecond(); in compareTo() 344 long secsOther = other.toInstant().getEpochSecond(); in compareTo() 349 cmp = Long.compare(toInstant().getNano(), other.toInstant().getNano()); in compareTo() 418 secs = toInstant().getEpochSecond(); in toString() 419 nanos = toInstant().getNano(); in toString()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKInstant.java | 445 …{Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC),… 483 …{Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC),… 2093 {LocalDateTime.of(0, 1, 2, 0, 0).toInstant(ZoneOffset.UTC), "0000-01-02T00:00:00Z"}, 2094 … {LocalDateTime.of(0, 1, 1, 12, 30).toInstant(ZoneOffset.UTC), "0000-01-01T12:30:00Z"}, 2095 …{LocalDateTime.of(0, 1, 1, 0, 0, 0, 1).toInstant(ZoneOffset.UTC), "0000-01-01T00:00:00.000000001Z"… 2096 {LocalDateTime.of(0, 1, 1, 0, 0).toInstant(ZoneOffset.UTC), "0000-01-01T00:00:00Z"}, 2098 …{LocalDateTime.of(-1, 12, 31, 23, 59, 59, 999_999_999).toInstant(ZoneOffset.UTC), "-0001-12-31T23:… 2099 … {LocalDateTime.of(-1, 12, 31, 12, 30).toInstant(ZoneOffset.UTC), "-0001-12-31T12:30:00Z"}, 2100 … {LocalDateTime.of(-1, 12, 30, 12, 30).toInstant(ZoneOffset.UTC), "-0001-12-30T12:30:00Z"}, 2102 … {LocalDateTime.of(-9999, 1, 2, 12, 30).toInstant(ZoneOffset.UTC), "-9999-01-02T12:30:00Z"}, [all …]
|
D | TCKClock_Tick.java | 88 …Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000_000).toInstant(), PARIS), Duration.ofMil… in test_tick_ClockDuration_250millis() 89 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000_000).toInstant()); in test_tick_ClockDuration_250millis() 96 …Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000).toInstant(), PARIS), Duration.ofNanos(2… in test_tick_ClockDuration_250micros() 97 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000).toInstant()); in test_tick_ClockDuration_250micros() 104 … Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i).toInstant(), PARIS), Duration.ofNanos(20)); in test_tick_ClockDuration_20nanos() 105 assertEquals(test.instant(), ZDT.withNano((i / 20) * 20).toInstant()); in test_tick_ClockDuration_20nanos()
|
D | TCKOffsetDateTime.java | 312 Clock clock = Clock.fixed(base.toInstant(), offset); 1311 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1323 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1335 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1347 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1359 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1371 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1383 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1402 assertEquals(a.toInstant().compareTo(b.toInstant()) == 0, true);
|
D | TCKClock_Fixed.java | 81 …INSTANT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2)).toInstant();
|
D | TCKClock_Offset.java | 82 …INSTANT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2)).toInstant();
|
D | TCKZonedDateTime.java | 298 Clock clock = Clock.fixed(expected.toInstant(), zone); 326 Clock clock = Clock.fixed(base.toInstant(), offset); 435 Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 35).toInstant(OFFSET_0200); 442 Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 45).toInstant(OFFSET_0200); 449 Instant instant = TEST_PARIS_GAP_2008_03_30_02_30.toInstant(OFFSET_0100); 456 Instant instant = TEST_PARIS_OVERLAP_2008_10_26_02_30.toInstant(OFFSET_0200); 463 Instant instant = TEST_PARIS_OVERLAP_2008_10_26_02_30.toInstant(OFFSET_0100); 470 Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).toInstant(OFFSET_0130); 707 return TEST_DATE_TIME_PARIS.toInstant().getLong(field); 2124 Instant test = dt.toInstant(); [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestOffsetDateTime_instants.java | 287 Instant test = dt.toInstant(); in test_toInstant_19700101() 294 Instant test = dt.toInstant(); in test_toInstant_19700101_oneNano() 301 Instant test = dt.toInstant(); in test_toInstant_19700101_minusOneNano() 308 Instant test = dt.toInstant(); in test_toInstant_19700102() 315 Instant test = dt.toInstant(); in test_toInstant_19691231()
|
D | TestClock_Fixed.java | 80 …INSTANT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2)).toInstant();
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/ |
D | TCKZoneRules.java | 123 Instant instant = old.toInstant(); in test_London_preTimeZones() 279 Instant instant = zdt.toInstant(); in test_London_getStandardOffset() 472 assertEquals(test.previousTransition(odt.toInstant()), last); in test_London_previousTransition_rulesBased() 505 Instant instant = old.toInstant(); in test_Paris_preTimeZones() 657 Instant instant = zdt.toInstant(); in test_Paris_getStandardOffset() 688 Instant instant = old.toInstant(); in test_NewYork_preTimeZones() 863 Instant instant = dateTime.toInstant(); in test_NewYork_getStandardOffset() 930 Instant instantBefore = LocalDate.of(2011, 12, 27).atStartOfDay(ZoneOffset.UTC).toInstant(); in test_Apia_jumpOverInternationalDateLine_M10_to_P14() 939 …assertEquals(trans.getInstant(), LocalDateTime.of(2011, 12, 31, 0, 0).toInstant(ZoneOffset.ofHours… in test_Apia_jumpOverInternationalDateLine_M10_to_P14() 950 Instant instantBefore = LocalDate.of(1892, 7, 2).atStartOfDay(ZoneOffset.UTC).toInstant(); in test_Apia_jumpForwardOverInternationalDateLine_P12_to_M12() [all …]
|
D | TCKZoneOffsetTransition.java | 126 assertEquals(test.getInstant(), before.toInstant(OFFSET_0200)); in test_getters_gap() 141 assertEquals(test.getInstant(), before.toInstant(OFFSET_0300)); in test_getters_overlap()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestJapaneseChronoImpl.java | 109 long millis = jodt.toInstant().toEpochMilli(); in test_JapaneseChrono_vsCalendar() 136 long millis = jodt.toInstant().toEpochMilli(); in test_dayOfYearVsCalendar()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | DateTest.java | 109 assertEquals(new Date(millis).toInstant(), Instant.ofEpochMilli(millis)); in check_convertFromAndToInstant_milliseconds() 176 Instant instant = date.toInstant(); in check_convertToInstantAndBack()
|
D | CalendarTest.java | 168 Instant instant = calendar.toInstant(); in testToInstant() 169 assertEquals(calendar.getTime().toInstant(), instant); in testToInstant()
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | FileTimeTest.java | 128 Instant instant = ft.toInstant(); in main() 137 Instant instant = ft.toInstant(); in main() 145 instant = ft.toInstant(); in main() 160 if (!ft.toInstant().equals(instant) || ft.to(SECONDS) != secs) { in main() 166 if (!ft.toInstant().equals(instant) || in main()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKInstantPrinterParser.java | 253 Instant expected = OffsetDateTime.of(1970, 2, 4, 0, 0, 0, 0, ZoneOffset.UTC).toInstant(); in test_parse_endOfDay() 265 …nstant expected = OffsetDateTime.of(1970, 2, 3, 23, 59, 59, 123456789, ZoneOffset.UTC).toInstant(); in test_parse_leapSecond()
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKClockSerialization.java | 87 private static final Instant INSTANT = ZDT.toInstant();
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeParsing.java | 151 assertEquals(Instant.from(actual), expected.toInstant()); in test_parse_instantZones_Instant() 169 …NT, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).toInstant()}, in data_instantNoZone()
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | ZipEntryTest.java | 176 .atZone(ZoneId.systemDefault()).toInstant().toEpochMilli()); in testSetTime() 180 .toInstant().toEpochMilli()); in testSetTime()
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | IsoChronologyTest.java | 106 .zonedDateTime(zonedDateTime.toInstant(), zonedDateTime.getZone()); in test_zonedDateTime()
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 108 Instant instant = zdt.toInstant(); in test() 227 cal0.setTimeInMillis(zdt.toInstant().toEpochMilli()); in testZoneId()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoZonedDateTimeImpl.java | 273 return this.zone.equals(zone) ? this : create(dateTime.toInstant(offset), zone); in withZoneSameInstant() 291 return create(dateTime.toInstant(offset), zone); in with()
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | ZoneOffsetTransition.java | 247 return transition.toInstant(offsetBefore); in getInstant()
|