/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),… 2099 {LocalDateTime.of(0, 1, 2, 0, 0).toInstant(ZoneOffset.UTC), "0000-01-02T00:00:00Z"}, 2100 … {LocalDateTime.of(0, 1, 1, 12, 30).toInstant(ZoneOffset.UTC), "0000-01-01T12:30:00Z"}, 2101 …{LocalDateTime.of(0, 1, 1, 0, 0, 0, 1).toInstant(ZoneOffset.UTC), "0000-01-01T00:00:00.000000001Z"… 2102 {LocalDateTime.of(0, 1, 1, 0, 0).toInstant(ZoneOffset.UTC), "0000-01-01T00:00:00Z"}, 2104 …{LocalDateTime.of(-1, 12, 31, 23, 59, 59, 999_999_999).toInstant(ZoneOffset.UTC), "-0001-12-31T23:… 2105 … {LocalDateTime.of(-1, 12, 31, 12, 30).toInstant(ZoneOffset.UTC), "-0001-12-31T12:30:00Z"}, 2106 … {LocalDateTime.of(-1, 12, 30, 12, 30).toInstant(ZoneOffset.UTC), "-0001-12-30T12:30:00Z"}, 2108 … {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 | 309 Clock clock = Clock.fixed(base.toInstant(), offset); 1296 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1308 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1320 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1332 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1344 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1356 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1368 assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); 1387 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();
|
/libcore/luni/src/test/java/libcore/java/time/zone/ |
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/luni/src/test/java/libcore/highmemorytest/java/util/ |
D | CurrencyTest.java | 53 LocalDateTime.of(2023, 2, 1, 0, 0).atZone(ZoneId.of("GMT")).toInstant() in test_currencyCodeIcuConsistency() 61 LocalDateTime.of(2025, 5, 1, 0, 0).atZone(ZoneId.of("GMT")).toInstant() in test_currencyCodeIcuConsistency()
|
/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 | 125 Instant instant = old.toInstant(); in test_London_preTimeZones() 290 Instant instant = zdt.toInstant(); in test_London_getStandardOffset() 490 assertEquals(test.previousTransition(odt.toInstant()), last); in test_London_previousTransition_rulesBased() 525 Instant instant = old.toInstant(); in test_Paris_preTimeZones() 686 Instant instant = zdt.toInstant(); in test_Paris_getStandardOffset() 719 Instant instant = old.toInstant(); in test_NewYork_preTimeZones() 903 Instant instant = dateTime.toInstant(); in test_NewYork_getStandardOffset() 974 Instant instantBefore = LocalDate.of(2011, 12, 27).atStartOfDay(ZoneOffset.UTC).toInstant(); in test_Apia_jumpOverInternationalDateLine_M10_to_P14() 983 …assertEquals(trans.getInstant(), LocalDateTime.of(2011, 12, 31, 0, 0).toInstant(ZoneOffset.ofHours… in test_Apia_jumpOverInternationalDateLine_M10_to_P14() 993 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 | 112 long millis = jodt.toInstant().toEpochMilli(); in test_JapaneseChrono_vsCalendar() 139 long millis = jodt.toInstant().toEpochMilli(); in test_dayOfYearVsCalendar()
|
/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/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/luni/src/test/java/libcore/java/time/ |
D | TimeApisConsistencyTest.java | 132 Instant start = START_DATE.atOffset(ZoneOffset.UTC).toInstant(); in runChecksAroundInterestingTimestamps() 133 Instant stop = END_DATE.atOffset(ZoneOffset.UTC).toInstant(); in runChecksAroundInterestingTimestamps()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKInstantPrinterParser.java | 292 Instant expected = OffsetDateTime.of(1970, 2, 4, 0, 0, 0, 0, ZoneOffset.UTC).toInstant(); in test_parse_endOfDay() 304 …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/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/main/java/java/time/chrono/ |
D | ChronoZonedDateTimeImpl.java | 274 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/util/zip/ |
D | ZipEntry.java | 290 ZonedDateTime.of(time, ZoneId.systemDefault()).toInstant()); in setTimeLocal() 313 return LocalDateTime.ofInstant(mtime.toInstant(), ZoneId.systemDefault()); in getTimeLocal()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeParsing.java | 166 assertEquals(Instant.from(actual), expected.toInstant()); in test_parse_instantZones_Instant() 184 …NT, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).toInstant()}, in data_instantNoZone()
|
/libcore/ojluni/src/test/java/time/test/java/time/zone/ |
D | TestZoneRules.java | 183 999999999).toInstant(ZoneOffset.UTC); in test_TransitionLastRuleYear() 214 Instant testDay = transitionDay.plusDays(days).toInstant(ZoneOffset.UTC); in test_EmptyTransitionList()
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 113 Instant instant = zdt.toInstant(); in test() 264 cal0.setTimeInMillis(zdt.toInstant().toEpochMilli()); in testZoneId()
|