Home
last modified time | relevance | path

Searched refs:dateTime (Results 1 – 16 of 16) sorted by relevance

/libcore/ojluni/src/main/java/java/time/
DOffsetDateTime.java186 private final LocalDateTime dateTime; field in OffsetDateTime
269 public static OffsetDateTime of(LocalDateTime dateTime, ZoneOffset offset) { in of() argument
270 return new OffsetDateTime(dateTime, offset); in of()
406 private OffsetDateTime(LocalDateTime dateTime, ZoneOffset offset) { in OffsetDateTime() argument
407 this.dateTime = Objects.requireNonNull(dateTime, "dateTime"); in OffsetDateTime()
417 private OffsetDateTime with(LocalDateTime dateTime, ZoneOffset offset) { in with() argument
418 if (this.dateTime == dateTime && this.offset.equals(offset)) { in with()
421 return new OffsetDateTime(dateTime, offset); in with()
556 return dateTime.range(field); in range()
598 return dateTime.get(field); in get()
[all …]
DZonedDateTime.java169 private final LocalDateTime dateTime; field in ZonedDateTime
602 private ZonedDateTime(LocalDateTime dateTime, ZoneOffset offset, ZoneId zone) { in ZonedDateTime() argument
603 this.dateTime = dateTime; in ZonedDateTime()
637 … if (offset.equals(this.offset) == false && zone.getRules().isValidOffset(dateTime, offset)) { in resolveOffset()
638 return new ZonedDateTime(dateTime, offset, zone); in resolveOffset()
772 return dateTime.range(field); in range()
814 return dateTime.get(field); in get()
849 return dateTime.getLong(field); in getLong()
885 ZoneOffsetTransition trans = getZone().getRules().getTransition(dateTime); in withEarlierOffsetAtOverlap()
889 return new ZonedDateTime(dateTime, earlierOffset, zone); in withEarlierOffsetAtOverlap()
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoZonedDateTimeImpl.java115 private final transient ChronoLocalDateTimeImpl<D> dateTime; field in ChronoZonedDateTimeImpl
218 …private ChronoZonedDateTimeImpl(ChronoLocalDateTimeImpl<D> dateTime, ZoneOffset offset, ZoneId zon… in ChronoZonedDateTimeImpl() argument
219 this.dateTime = Objects.requireNonNull(dateTime, "dateTime"); in ChronoZonedDateTimeImpl()
236 return new ChronoZonedDateTimeImpl<>(dateTime, earlierOffset, zone); in withEarlierOffsetAtOverlap()
248 return new ChronoZonedDateTimeImpl<>(dateTime, offset, zone); in withLaterOffsetAtOverlap()
257 return dateTime; in toLocalDateTime()
267 return ofBest(dateTime, zone, offset); in withZoneSameLocal()
273 return this.zone.equals(zone) ? this : create(dateTime.toInstant(offset), zone); in withZoneSameInstant()
291 return create(dateTime.toInstant(offset), zone); in with()
294 return ofBest(dateTime.with(field, newValue), zone, offset); in with()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKZonedDateTime.java1253 assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 15, 50, 30, 40));
1261 …ZonedDateTime zdt = dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // earlier part…
1263 assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 0, 50, 30, 40));
1271 …ZonedDateTime zdt = dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // earlier part…
1273 assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 15, 50, 30, 40));
1281 …ZonedDateTime zdt = dateTime(2008, 10, 26, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS); // just before o…
1283 assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 2, 30, 30, 40));
1291 …ZonedDateTime zdt = dateTime(2008, 10, 26, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS); // just before o…
1293 assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 2, 30, 30, 40));
1311 dateTime(2009, 6, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)},
[all …]
DTCKLocalDateTime.java386 LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30);
387 check(dateTime, 2007, 7, 15, 12, 30, 0, 0);
433 LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40);
434 check(dateTime, 2007, 7, 15, 12, 30, 40, 0);
490 LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40, 987654321);
491 check(dateTime, 2007, 7, 15, 12, 30, 40, 987654321);
557 LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30);
558 check(dateTime, 2007, 7, 15, 12, 30, 0, 0);
609 LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30, 40);
610 check(dateTime, 2007, 7, 15, 12, 30, 40, 0);
[all …]
DTCKOffsetTime.java733 public Temporal adjustInto(Temporal dateTime) {
762 public Temporal adjustInto(Temporal dateTime) {
763 return dateTime.with(HOUR_OF_DAY, 23);
DTCKOffsetDateTime.java716 public Temporal adjustInto(Temporal dateTime) {
DTCKLocalDate.java845 public Temporal adjustInto(Temporal dateTime) {
DTCKLocalTime.java773 public Temporal adjustInto(Temporal dateTime) { in test_with_adjustment()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticChronology.java188 public CopticDate date(TemporalAccessor dateTime) { in date() argument
189 if (dateTime instanceof CopticDate) { in date()
190 return (CopticDate) dateTime; in date()
192 return CopticDate.ofEpochDay(dateTime.getLong(EPOCH_DAY)); in date()
DTCKChronoLocalDateTime.java324 ChronoLocalDateTime<?> dateTime = chrono.localDateTime(refDateTime); in test_from_TemporalAccessor() local
325 ChronoLocalDateTime<?> test1 = ChronoLocalDateTime.from(dateTime); in test_from_TemporalAccessor()
326 assertEquals(test1, dateTime); in test_from_TemporalAccessor()
327 ChronoLocalDateTime<?> test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); in test_from_TemporalAccessor()
328 assertEquals(test2, dateTime); in test_from_TemporalAccessor()
DTCKChronoZonedDateTime.java327 ChronoZonedDateTime<?> dateTime = chrono.zonedDateTime(refDateTime); in test_from_TemporalAccessor() local
328 ChronoZonedDateTime<?> test1 = ChronoZonedDateTime.from(dateTime); in test_from_TemporalAccessor()
329 assertEquals(test1, dateTime); in test_from_TemporalAccessor()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestZoneId.java259 final LocalDateTime dateTime = LocalDateTime.of(2008, 3, 30, 1, 0, 0, 0); in test_London_getOffsetInfo_gap() local
260 … ZoneOffsetTransition trans = checkOffset(test.getRules(), dateTime, ZoneOffset.ofHours(0), GAP); in test_London_getOffsetInfo_gap()
265 assertEquals(trans.getInstant(), dateTime.toInstant(ZoneOffset.UTC)); in test_London_getOffsetInfo_gap()
278 final ZoneOffsetTransition otherTrans = test.getRules().getTransition(dateTime); in test_London_getOffsetInfo_gap()
285 final LocalDateTime dateTime = LocalDateTime.of(2008, 10, 26, 1, 0, 0, 0); in test_London_getOffsetInfo_overlap() local
286 …ZoneOffsetTransition trans = checkOffset(test.getRules(), dateTime, ZoneOffset.ofHours(1), OVERLAP… in test_London_getOffsetInfo_overlap()
291 assertEquals(trans.getInstant(), dateTime.toInstant(ZoneOffset.UTC)); in test_London_getOffsetInfo_overlap()
304 final ZoneOffsetTransition otherTrans = test.getRules().getTransition(dateTime); in test_London_getOffsetInfo_overlap()
414 final LocalDateTime dateTime = LocalDateTime.of(2008, 3, 30, 2, 0, 0, 0); in test_Paris_getOffsetInfo_gap() local
415 … ZoneOffsetTransition trans = checkOffset(test.getRules(), dateTime, ZoneOffset.ofHours(1), GAP); in test_Paris_getOffsetInfo_gap()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRules.java226 final LocalDateTime dateTime = LocalDateTime.of(2008, 3, 30, 1, 0, 0, 0); in test_London_getOffsetInfo_gap() local
227 ZoneOffsetTransition trans = checkOffset(test, dateTime, OFFSET_ZERO, GAP); in test_London_getOffsetInfo_gap()
244 final ZoneOffsetTransition otherTrans = test.getTransition(dateTime); in test_London_getOffsetInfo_gap()
251 final LocalDateTime dateTime = LocalDateTime.of(2008, 10, 26, 1, 0, 0, 0); in test_London_getOffsetInfo_overlap() local
252 ZoneOffsetTransition trans = checkOffset(test, dateTime, OFFSET_PONE, OVERLAP); in test_London_getOffsetInfo_overlap()
270 final ZoneOffsetTransition otherTrans = test.getTransition(dateTime); in test_London_getOffsetInfo_overlap()
608 final LocalDateTime dateTime = LocalDateTime.of(2008, 3, 30, 2, 0, 0, 0); in test_Paris_getOffsetInfo_gap() local
609 ZoneOffsetTransition trans = checkOffset(test, dateTime, OFFSET_PONE, GAP); in test_Paris_getOffsetInfo_gap()
624 final ZoneOffsetTransition otherTrans = test.getTransition(dateTime); in test_Paris_getOffsetInfo_gap()
631 final LocalDateTime dateTime = LocalDateTime.of(2008, 10, 26, 2, 0, 0, 0); in test_Paris_getOffsetInfo_overlap() local
[all …]
/libcore/ojluni/annotations/hiddenapi/java/time/
DOffsetDateTime.java75 private OffsetDateTime(java.time.LocalDateTime dateTime, java.time.ZoneOffset offset) { in OffsetDateTime() argument
106 java.time.LocalDateTime dateTime, java.time.ZoneOffset offset) { in of() argument
141 java.time.LocalDateTime dateTime, java.time.ZoneOffset offset) { in with() argument
452 private final java.time.LocalDateTime dateTime; field in OffsetDateTime
455 dateTime = null;
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransitionRule.java611 …public LocalDateTime createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset … in createDateTime() argument
615 return dateTime.plusSeconds(difference); in createDateTime()
619 return dateTime.plusSeconds(difference); in createDateTime()
622 return dateTime; in createDateTime()