Home
last modified time | relevance | path

Searched refs:localDateTime (Results 1 – 21 of 21) sorted by relevance

/libcore/ojluni/src/main/java/java/time/
DZonedDateTime.java286 public static ZonedDateTime of(LocalDateTime localDateTime, ZoneId zone) { in of() argument
287 return ofLocal(localDateTime, zone, null); in of()
360 …public static ZonedDateTime ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferred… in ofLocal() argument
361 Objects.requireNonNull(localDateTime, "localDateTime"); in ofLocal()
364 return new ZonedDateTime(localDateTime, (ZoneOffset) zone, zone); in ofLocal()
367 List<ZoneOffset> validOffsets = rules.getValidOffsets(localDateTime); in ofLocal()
372 ZoneOffsetTransition trans = rules.getTransition(localDateTime); in ofLocal()
373 localDateTime = localDateTime.plusSeconds(trans.getDuration().getSeconds()); in ofLocal()
382 return new ZonedDateTime(localDateTime, offset, zone); in ofLocal()
426 …public static ZonedDateTime ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)… in ofInstant() argument
[all …]
/libcore/luni/src/test/java/libcore/java/time/
DZonedDateTimeTest.java98 private static void checkOfInstant(LocalDateTime localDateTime, ZoneOffset offset, in checkOfInstant() argument
100 ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(localDateTime, offset, zone); in checkOfInstant()
102 localDateTime, offset, zone, zonedDateTime); in checkOfInstant()
168 private static void checkOfLocal(LocalDateTime localDateTime, ZoneId zone, in checkOfLocal() argument
170 ZonedDateTime zonedDateTime = ZonedDateTime.ofLocal(localDateTime, zone, preferredOffset); in checkOfLocal()
172 localDateTime, zone, preferredOffset, zonedDateTime); in checkOfLocal()
/libcore/luni/src/test/java/libcore/java/time/zone/
DZoneRulesTest.java59 LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, offset); in test_of_ZoneOffset() local
60 assertNull(zoneRules.getTransition(localDateTime)); in test_of_ZoneOffset()
62 zoneRules.getValidOffsets(localDateTime)); in test_of_ZoneOffset()
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoZonedDateTimeImpl.java135 ChronoLocalDateTimeImpl<R> localDateTime, ZoneId zone, ZoneOffset preferredOffset) { in ofBest() argument
136 Objects.requireNonNull(localDateTime, "localDateTime"); in ofBest()
139 return new ChronoZonedDateTimeImpl<>(localDateTime, (ZoneOffset) zone, zone); in ofBest()
142 LocalDateTime isoLDT = LocalDateTime.from(localDateTime); in ofBest()
149 localDateTime = localDateTime.plusSeconds(trans.getDuration().getSeconds()); in ofBest()
159 return new ChronoZonedDateTimeImpl<>(localDateTime, offset, zone); in ofBest()
175 ChronoLocalDateTimeImpl<?> cldt = (ChronoLocalDateTimeImpl<?>)chrono.localDateTime(ldt); in ofInstant()
DMinguoChronology.java262 public ChronoLocalDateTime<MinguoDate> localDateTime(TemporalAccessor temporal) { in localDateTime() method in MinguoChronology
263 return (ChronoLocalDateTime<MinguoDate>)super.localDateTime(temporal); in localDateTime()
DChronology.java470 … default ChronoLocalDateTime<? extends ChronoLocalDate> localDateTime(TemporalAccessor temporal) { in localDateTime() method
510 …ronoLocalDateTimeImpl<?> cldt = ChronoLocalDateTimeImpl.ensureValid(this, localDateTime(temporal)); in zonedDateTime()
DThaiBuddhistChronology.java298 public ChronoLocalDateTime<ThaiBuddhistDate> localDateTime(TemporalAccessor temporal) { in localDateTime() method in ThaiBuddhistChronology
299 return (ChronoLocalDateTime<ThaiBuddhistDate>)super.localDateTime(temporal); in localDateTime()
DJapaneseChronology.java318 public ChronoLocalDateTime<JapaneseDate> localDateTime(TemporalAccessor temporal) { in localDateTime() method in JapaneseChronology
319 return (ChronoLocalDateTime<JapaneseDate>)super.localDateTime(temporal); in localDateTime()
DChronoLocalDateTime.java173 return chrono.localDateTime(temporal); in from()
DHijrahChronology.java528 public ChronoLocalDateTime<HijrahDate> localDateTime(TemporalAccessor temporal) { in localDateTime() method in HijrahChronology
529 return (ChronoLocalDateTime<HijrahDate>) super.localDateTime(temporal); in localDateTime()
DIsoChronology.java276 public LocalDateTime localDateTime(TemporalAccessor temporal) { in localDateTime() method in IsoChronology
DChronoLocalDateTimeImpl.java374 … ChronoLocalDateTime<D> end = (ChronoLocalDateTime<D>) getChronology().localDateTime(endExclusive); in until()
/libcore/ojluni/src/main/java/java/time/zone/
DZoneRules.java536 public ZoneOffset getOffset(LocalDateTime localDateTime) { in getOffset() argument
537 Object info = getOffsetInfo(localDateTime); in getOffset()
586 public List<ZoneOffset> getValidOffsets(LocalDateTime localDateTime) { in getValidOffsets() argument
588 Object info = getOffsetInfo(localDateTime); in getValidOffsets()
629 public ZoneOffsetTransition getTransition(LocalDateTime localDateTime) { in getTransition() argument
630 Object info = getOffsetInfo(localDateTime); in getTransition()
821 public boolean isValidOffset(LocalDateTime localDateTime, ZoneOffset offset) { in isValidOffset() argument
822 return getValidOffsets(localDateTime).contains(offset); in isValidOffset()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestOffsetDateTime.java111 LocalDateTime localDateTime = LocalDateTime.of(localDate, localTime); in test_get_same() local
112 OffsetDateTime a = OffsetDateTime.of(localDateTime, offset); in test_get_same()
117 assertSame(a.toLocalDateTime(), localDateTime); in test_get_same() local
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestChronoLocalDate.java188 ChronoLocalDateTime<?> ldt = chrono.localDateTime(now);
195 ChronoLocalDateTime<? extends ChronoLocalDate> ldt = chrono.localDateTime(now);
DTestUmmAlQuraChronology.java721 … ChronoLocalDateTime<HijrahDate> result = HijrahChronology.INSTANCE.localDateTime(accessor); in test_localDateTime()
727 … ChronoLocalDateTime<HijrahDate> result = HijrahChronology.INSTANCE.localDateTime(accessor); in test_localDateTime()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoLocalDateTime.java324 ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); in test_from_TemporalAccessor()
349 ChronoLocalDateTime<?> test = chrono.localDateTime(LocalDateTime.of(2010, 6, 30, 11, 30)); in test_getChronology()
DTCKIsoChronology.java187 assertEquals(IsoChronology.INSTANCE.localDateTime(new TemporalAccessor() { in test_localDateTime_TemporalAccessor()
223 IsoChronology.INSTANCE.localDateTime(null); in test_localDateTime_TemporalAccessor_null()
DTCKMinguoChronology.java427 … ChronoLocalDateTime<MinguoDate> result = MinguoChronology.INSTANCE.localDateTime(accessor); in test_localDateTime()
433 … ChronoLocalDateTime<MinguoDate> result = MinguoChronology.INSTANCE.localDateTime(accessor); in test_localDateTime()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKOffsetDateTime.java515 LocalDateTime localDateTime = LocalDateTime.of(localDate, localTime);
516 OffsetDateTime a = OffsetDateTime.of(localDateTime, offset);
524 assertEquals(a.getHour(), localDateTime.getHour());
525 assertEquals(a.getMinute(), localDateTime.getMinute());
526 assertEquals(a.getSecond(), localDateTime.getSecond());
527 assertEquals(a.getNano(), localDateTime.getNano());
530 assertEquals(a.toString(), localDateTime.toString() + offset.toString());
DTCKZonedDateTime.java834 LocalDateTime localDateTime = LocalDateTime.of(localDate, localTime);
835 ZoneOffset offset = zone.getRules().getOffset(localDateTime);
836 ZonedDateTime a = ZonedDateTime.of(localDateTime, zone);
851 assertEquals(a.toLocalDateTime(), localDateTime);
853 assertEquals(a.toString(), localDateTime.toString() + offset.toString());
855 …assertEquals(a.toString(), localDateTime.toString() + offset.toString() + "[" + zone.toString() + …