Home
last modified time | relevance | path

Searched refs:ofEpochSecond (Results 1 – 25 of 31) 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);
DTCKDuration.java774 Instant start = Instant.ofEpochSecond(secs1, nanos1); in factory_between_TemporalTemporal_Instant()
775 Instant end = Instant.ofEpochSecond(secs2, nanos2); in factory_between_TemporalTemporal_Instant()
783 Instant start = Instant.ofEpochSecond(secs1, nanos1); in factory_between_TemporalTemporal_Instant_negated()
784 Instant end = Instant.ofEpochSecond(secs2, nanos2); in factory_between_TemporalTemporal_Instant_negated()
849 Instant start = Instant.ofEpochSecond(1); in factory_between_TemporalTemporal_mixedTypes()
850 ZonedDateTime end = Instant.ofEpochSecond(4).atZone(ZoneOffset.UTC); in factory_between_TemporalTemporal_mixedTypes()
856 Instant start = Instant.ofEpochSecond(1); in factory_between_TemporalTemporal_invalidMixedTypes()
863 Instant end = Instant.ofEpochSecond(1); in factory_between__TemporalTemporal_startNull()
869 Instant start = Instant.ofEpochSecond(1); in factory_between__TemporalTemporal_endNull()
DTCKZonedDateTime.java277 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
296 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
308 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
478 Instant instant = Instant.ofEpochSecond(i);
494 Instant instant = Instant.ofEpochSecond(i * 24L * 60L * 60L);
506 … Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MIN.getTotalSeconds());
523 … Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MAX.getTotalSeconds());
540 …Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MIN.getTotalSeco…
557 …Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MAX.getTotalSeco…
572 Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE);
[all …]
DTCKLocalDateTime.java309 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
325 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
342 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
763 …{Instant.ofEpochSecond(86400 + 3600 + 120 + 4, 500), ZONE_PARIS, LocalDateTime.of(1970, 1, 2, 2, 2…
764 …{Instant.ofEpochSecond(86400 + 3600 + 120 + 4, 500), OFFSET_MTWO, LocalDateTime.of(1970, 1, 1, 23,…
765 …{Instant.ofEpochSecond(-86400 + 4, 500), OFFSET_PTWO, LocalDateTime.of(1969, 12, 31, 2, 0, 4, 500)…
806 LocalDateTime test = LocalDateTime.ofEpochSecond(i, 500, OFFSET_PTWO);
815 LocalDateTime test = LocalDateTime.ofEpochSecond(-i, 500, OFFSET_PTWO);
822 LocalDateTime.ofEpochSecond(Long.MAX_VALUE, 500, OFFSET_PONE); // TODO: better test
827 LocalDateTime.ofEpochSecond(Long.MIN_VALUE, 500, OFFSET_PONE); // TODO: better test
[all …]
DTCKOffsetTime.java224 Instant instant = Instant.ofEpochSecond(i, 8);
238 Instant instant = Instant.ofEpochSecond(i, 8);
327 Instant instant = Instant.ofEpochSecond(0L);
334 Instant instant = Instant.ofEpochSecond(i, 8);
346 Instant instant = Instant.ofEpochSecond(i, 8);
DTCKOffsetDateTime.java260 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
277 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
295 Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L);
1201 odt.until(Instant.ofEpochSecond(12), SECONDS);
/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/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.java112 Instant instant = Instant.ofEpochSecond(instantSecs, nano); in test_print_grouped()
190 Instant instant = Instant.ofEpochSecond(instantSecs, nano); in test_print_digits()
226 Instant expected = Instant.ofEpochSecond(instantSecs, nano); in test_parse_digitsMinusOne()
237 Instant expected = Instant.ofEpochSecond(instantSecs, nano); in test_parse_digitsNine()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestDateTimeParsing.java130 {INSTANTSECONDS_WITH_PARIS, "86402", Instant.ofEpochSecond(86402).atZone(PARIS)}, in data_instantZones()
131 …{INSTANTSECONDS_NOS_WITH_PARIS, "86402.123456789", Instant.ofEpochSecond(86402, 123456789).atZone(… in data_instantZones()
132 … {INSTANTSECONDS_OFFSETSECONDS, "86402 9000", Instant.ofEpochSecond(86402).atZone(OFFSET_0230)}, in data_instantZones()
170 {INSTANTSECONDS, "86402", Instant.ofEpochSecond(86402)}, in data_instantNoZone()
171 {INSTANTSECONDS_NOS, "86402.123456789", Instant.ofEpochSecond(86402, 123456789)}, in data_instantNoZone()
/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);
297 public static Instant ofEpochSecond(long epochSecond) { in ofEpochSecond() method in Instant
321 public static Instant ofEpochSecond(long epochSecond, long nanoAdjustment) { in ofEpochSecond() method in Instant
369 return Instant.ofEpochSecond(instantSecs, nanoOfSecond); in from()
923 return ofEpochSecond(epochSec, nanoAdjustment); in plus()
1362 return Instant.ofEpochSecond(seconds, nanos); in readExternal()
DLocalDateTime.java207 return ofEpochSecond(now.getEpochSecond(), now.getNano(), offset); in now()
392 return ofEpochSecond(instant.getEpochSecond(), instant.getNano(), offset); in ofInstant()
410 … public static LocalDateTime ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset) { in ofEpochSecond() method in LocalDateTime
DOffsetDateTime.java322 …LocalDateTime ldt = LocalDateTime.ofEpochSecond(instant.getEpochSecond(), instant.getNano(), offse… in ofInstant()
965 … case INSTANT_SECONDS: return ofInstant(Instant.ofEpochSecond(newValue, getNano()), offset); in with()
DZonedDateTime.java448 …Instant instant = Instant.ofEpochSecond(epochSecond, nanoOfSecond); // TODO: rules should be quer… in create()
450 LocalDateTime ldt = LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, offset); in create()
/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/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.java74 return Instant.ofEpochSecond(timeInSeconds); in timeFromSeconds()
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransition.java168 this.transition = LocalDateTime.ofEpochSecond(epochSecond, 0, offsetBefore); in ZoneOffsetTransition()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoLocalDateTime.java446 return Instant.ofEpochSecond(toEpochSecond(offset), toLocalTime().getNano()); in toInstant()
DChronoZonedDateTime.java531 return Instant.ofEpochSecond(toEpochSecond(), toLocalTime().getNano()); in toInstant()
DChronoZonedDateTimeImpl.java174 …LocalDateTime ldt = LocalDateTime.ofEpochSecond(instant.getEpochSecond(), instant.getNano(), offse… in ofInstant()
/libcore/ojluni/src/main/java/java/time/format/
DParsed.java343 Instant instant = Instant.ofEpochSecond(fieldValues.remove(INSTANT_SECONDS)); in resolveInstantFields0()

12