Home
last modified time | relevance | path

Searched refs:ofEpochSecond (Results 1 – 25 of 38) sorted by relevance

12

/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKInstant.java131 TEST_12345_123456789 = Instant.ofEpochSecond(12345, 123456789); in setUp()
208 Instant expected = Instant.ofEpochSecond(i).plusNanos(123456789L);
218 Instant expected = Instant.ofEpochSecond(i).plusNanos(123456789L);
231 Instant t = Instant.ofEpochSecond(i);
244 Instant t = Instant.ofEpochSecond(i, j);
249 Instant t = Instant.ofEpochSecond(i, j);
254 Instant t = Instant.ofEpochSecond(i, j);
263 Instant test = Instant.ofEpochSecond(2L, -1);
270 Instant.ofEpochSecond(MAX_SECOND, 1000000000);
275 Instant.ofEpochSecond(Long.MAX_VALUE, Long.MAX_VALUE);
[all …]
DTCKClock.java113 private static final Instant INSTANT = Instant.ofEpochSecond(1873687, 357000000);
DTCKZonedDateTime.java271 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
290 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
302 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
472 Instant instant = Instant.ofEpochSecond(i);
488 Instant instant = Instant.ofEpochSecond(i * 24L * 60L * 60L);
500 … Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MIN.getTotalSeconds());
517 … Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MAX.getTotalSeconds());
534 …Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MIN.getTotalSeco…
551 …Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MAX.getTotalSeco…
566 Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE);
[all …]
DTCKDuration.java801 Instant start = Instant.ofEpochSecond(secs1, nanos1); in factory_between_TemporalTemporal_Instant()
802 Instant end = Instant.ofEpochSecond(secs2, nanos2); in factory_between_TemporalTemporal_Instant()
810 Instant start = Instant.ofEpochSecond(secs1, nanos1); in factory_between_TemporalTemporal_Instant_negated()
811 Instant end = Instant.ofEpochSecond(secs2, nanos2); in factory_between_TemporalTemporal_Instant_negated()
876 Instant start = Instant.ofEpochSecond(1); in factory_between_TemporalTemporal_mixedTypes()
877 ZonedDateTime end = Instant.ofEpochSecond(4).atZone(ZoneOffset.UTC); in factory_between_TemporalTemporal_mixedTypes()
883 Instant start = Instant.ofEpochSecond(1); in factory_between_TemporalTemporal_invalidMixedTypes()
890 Instant end = Instant.ofEpochSecond(1); in factory_between__TemporalTemporal_startNull()
896 Instant start = Instant.ofEpochSecond(1); in factory_between__TemporalTemporal_endNull()
DTCKLocalDateTime.java303 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
319 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
336 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
757 …{Instant.ofEpochSecond(86400 + 3600 + 120 + 4, 500), ZONE_PARIS, LocalDateTime.of(1970, 1, 2, 2, 2…
758 …{Instant.ofEpochSecond(86400 + 3600 + 120 + 4, 500), OFFSET_MTWO, LocalDateTime.of(1970, 1, 1, 23,…
759 …{Instant.ofEpochSecond(-86400 + 4, 500), OFFSET_PTWO, LocalDateTime.of(1969, 12, 31, 2, 0, 4, 500)…
800 LocalDateTime test = LocalDateTime.ofEpochSecond(i, 500, OFFSET_PTWO);
809 LocalDateTime test = LocalDateTime.ofEpochSecond(-i, 500, OFFSET_PTWO);
816 LocalDateTime.ofEpochSecond(Long.MAX_VALUE, 500, OFFSET_PONE); // TODO: better test
821 LocalDateTime.ofEpochSecond(Long.MIN_VALUE, 500, OFFSET_PONE); // TODO: better test
[all …]
DTCKOffsetTime.java228 Instant instant = Instant.ofEpochSecond(i, 8);
242 Instant instant = Instant.ofEpochSecond(i, 8);
331 Instant instant = Instant.ofEpochSecond(0L);
338 Instant instant = Instant.ofEpochSecond(i, 8);
350 Instant instant = Instant.ofEpochSecond(i, 8);
1151 Instant.ofEpochSecond(-3600).getEpochSecond()},
1153 Instant.ofEpochSecond(-126282600L).getEpochSecond()},
DTCKLocalDate.java280 Instant instant = Instant.ofEpochSecond(i); in now_Clock_allSecsInDay_utc()
292 Instant instant = Instant.ofEpochSecond(i);
304 Instant instant = Instant.ofEpochSecond(i);
490 … {Instant.ofEpochSecond(86400 + 3600 + 120 + 4, 500), ZONE_PARIS, LocalDate.of(1970, 1, 2)},
491 … {Instant.ofEpochSecond(86400 + 3600 + 120 + 4, 500), OFFSET_MTWO, LocalDate.of(1970, 1, 1)},
492 {Instant.ofEpochSecond(-86400 + 4, 500), OFFSET_PTWO, LocalDate.of(1969, 12, 31)},
2201 Instant.ofEpochSecond(-62135600400L).getEpochSecond()},
2203 Instant.ofEpochSecond(812196000L).getEpochSecond()},
/libcore/luni/src/test/java/libcore/java/util/
DDateTest.java129 Date.from(Instant.ofEpochSecond(minSecond)); in test_convertFromInstant_secondsAndNanos()
132 Date.from(Instant.ofEpochSecond(minSecond - 1, 192000000)); in test_convertFromInstant_secondsAndNanos()
133 assertArithmeticOverflowDateFrom(Instant.ofEpochSecond(minSecond - 1, 0)); in test_convertFromInstant_secondsAndNanos()
134 assertArithmeticOverflowDateFrom(Instant.ofEpochSecond(minSecond - 1, 191999999)); in test_convertFromInstant_secondsAndNanos()
138 Date.from(Instant.ofEpochSecond(maxSecond, 0)); in test_convertFromInstant_secondsAndNanos()
141 Date.from(Instant.ofEpochSecond(maxSecond, 807999999)); in test_convertFromInstant_secondsAndNanos()
142 assertArithmeticOverflowDateFrom(Instant.ofEpochSecond(maxSecond + 1, 0)); in test_convertFromInstant_secondsAndNanos()
143 assertArithmeticOverflowDateFrom(Instant.ofEpochSecond(maxSecond, 808000000)); in test_convertFromInstant_secondsAndNanos()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestOffsetDateTime_instants.java93 Instant instant = Instant.ofEpochSecond(0L); in factory_ofInstant_nullOffset()
99 Instant instant = Instant.ofEpochSecond(i); in factory_ofInstant_allSecsInDay()
114 Instant instant = Instant.ofEpochSecond(i * 24L * 60L * 60L); in factory_ofInstant_allDaysInCycle()
135 Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L); in factory_ofInstant_tooLow()
148 Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L); in factory_ofInstant_tooBig()
157 … Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MIN.getTotalSeconds()); in factory_ofInstant_minWithMinOffset()
173 … Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MAX.getTotalSeconds()); in factory_ofInstant_minWithMaxOffset()
189 …Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MIN.getTotalSeco… in factory_ofInstant_maxWithMinOffset()
205 …Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MAX.getTotalSeco… in factory_ofInstant_maxWithMaxOffset()
220 Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE); in factory_ofInstant_maxInstantWithMaxOffset()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestDateTimeParsing.java143 {INSTANTSECONDS_WITH_PARIS, "86402", Instant.ofEpochSecond(86402).atZone(PARIS)}, in data_instantZones()
144 …{INSTANTSECONDS_NOS_WITH_PARIS, "86402.123456789", Instant.ofEpochSecond(86402, 123456789).atZone(… in data_instantZones()
145 … {INSTANTSECONDS_OFFSETSECONDS, "86402 9000", Instant.ofEpochSecond(86402).atZone(OFFSET_0230)}, in data_instantZones()
146 …{INSTANTSECONDS_WITH_NEW_YORK, "1604206800", Instant.ofEpochSecond(1604206800).atZone(NEW_YORK)}, … in data_instantZones()
147 …{INSTANTSECONDS_WITH_NEW_YORK, "1604210400", Instant.ofEpochSecond(1604210400).atZone(NEW_YORK)}, … in data_instantZones()
185 {INSTANTSECONDS, "86402", Instant.ofEpochSecond(86402)}, in data_instantNoZone()
186 {INSTANTSECONDS_NOS, "86402.123456789", Instant.ofEpochSecond(86402, 123456789)}, in data_instantNoZone()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneOffsetTransition.java179 LocalDateTime.ofEpochSecond(23875287L - 1, 0, OFFSET_0200), OFFSET_0200, OFFSET_0300); in test_compareTo()
181 LocalDateTime.ofEpochSecond(23875287L, 0, OFFSET_0300), OFFSET_0300, OFFSET_0200); in test_compareTo()
183 LocalDateTime.ofEpochSecond(23875287L + 1, 0, OFFSET_0100), OFFSET_0100,OFFSET_0400); in test_compareTo()
201 LocalDateTime.ofEpochSecond(23875287L, 0, OFFSET_0200), OFFSET_0200, OFFSET_0300); in test_compareTo_sameInstant()
203 LocalDateTime.ofEpochSecond(23875287L, 0, OFFSET_0300), OFFSET_0300, OFFSET_0200); in test_compareTo_sameInstant()
205 LocalDateTime.ofEpochSecond(23875287L, 0, OFFSET_0100), OFFSET_0100, OFFSET_0400); in test_compareTo_sameInstant()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKInstantPrinterParser.java118 Instant instant = Instant.ofEpochSecond(instantSecs, nano); in test_print_grouped()
196 Instant instant = Instant.ofEpochSecond(instantSecs, nano); in test_print_digits()
241 Instant expected = Instant.ofEpochSecond(instantSecs, nano); in test_parse_digitsMinusOne()
270 Instant expected = Instant.ofEpochSecond(instantSecs, nano); in test_parse_digitsNine()
/libcore/ojluni/src/test/java/nio/file/attribute/
DFileTimeTest.java158 Instant instant = Instant.ofEpochSecond(secs, rand.nextInt(1000_000_000)); in main()
174 instant = Instant.ofEpochSecond(secs, nanos); in main()
235 FileTime.from(Instant.ofEpochSecond(Long.MAX_VALUE / 1000 + 1)) in main()
240 FileTime.from(Instant.ofEpochSecond(Long.MIN_VALUE / 1000 - 1)) in main()
245 FileTime.from(Instant.ofEpochSecond(Long.MAX_VALUE / 1000 + 1)) in main()
248 FileTime.from(Instant.ofEpochSecond(Long.MAX_VALUE / 1000, in main()
252 FileTime.from(Instant.ofEpochSecond(Long.MIN_VALUE / 1000 - 1)) in main()
255 FileTime.from(Instant.ofEpochSecond(Long.MIN_VALUE / 1000, in main()
/libcore/ojluni/src/main/java/java/time/
DInstant.java226 public static final Instant MIN = Instant.ofEpochSecond(MIN_SECOND, 0);
237 public static final Instant MAX = Instant.ofEpochSecond(MAX_SECOND, 999_999_999);
298 public static Instant ofEpochSecond(long epochSecond) { in ofEpochSecond() method in Instant
322 public static Instant ofEpochSecond(long epochSecond, long nanoAdjustment) { in ofEpochSecond() method in Instant
370 return Instant.ofEpochSecond(instantSecs, nanoOfSecond); in from()
922 return ofEpochSecond(epochSec, nanoAdjustment); in plus()
1359 return Instant.ofEpochSecond(seconds, nanos); in readExternal()
DLocalDateTime.java208 return ofEpochSecond(now.getEpochSecond(), now.getNano(), offset); in now()
393 return ofEpochSecond(instant.getEpochSecond(), instant.getNano(), offset); in ofInstant()
411 … public static LocalDateTime ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset) { in ofEpochSecond() method in LocalDateTime
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKInstantSerialization.java91 assertSerializedBySer(Instant.ofEpochSecond(654321, 123456789), bytes); in test_serialization_format()
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransition.java175 this.transition = LocalDateTime.ofEpochSecond(epochSecond, 0, offsetBefore); in ZoneOffsetTransition()
254 return Instant.ofEpochSecond(epochSecond); in getInstant()
/libcore/ojluni/src/main/java/java/nio/file/attribute/
DFileTime.java271 instant = Instant.ofEpochSecond(secs, nanos); in toInstant()
428 ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, nanos, ZoneOffset.UTC); in toString()
435 ldt = LocalDateTime.ofEpochSecond(lo - SECONDS_0000_TO_1970, nanos, ZoneOffset.UTC); in toString()
/libcore/luni/src/test/java/libcore/libcore/util/
DZoneInfoTest.java80 return Instant.ofEpochSecond(timeInSeconds); in timeFromSeconds()
/libcore/luni/src/test/java/libcore/highmemorytest/java/time/format/
DDateTimeFormatterTest.java53 private static final Instant TEST_INSTANT = Instant.ofEpochSecond(1640995200L);
/libcore/luni/src/test/java/libcore/java/time/chrono/
DHijrahDateTest.java129 hijrahNow.until(Instant.ofEpochSecond(1622113481L), ChronoUnit.DAYS); in until_isoDates_unsupportedTypes()
/libcore/luni/src/test/java/libcore/java/time/format/
DDateTimeFormatterTest.java104 private static final Instant TEST_INSTANT = Instant.ofEpochSecond(1640995200L);
/libcore/luni/src/test/java/libcore/java/time/
DTimeApisConsistencyTest.java56 = Instant.ofEpochSecond(2145916800); // 1 Jan 2038
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTime.java453 return Instant.ofEpochSecond(toEpochSecond(offset), toLocalTime().getNano()); in toInstant()
DChronoZonedDateTime.java538 return Instant.ofEpochSecond(toEpochSecond(), toLocalTime().getNano()); in toInstant()

12