/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestOffsetDateTime.java | 67 import java.time.OffsetDateTime; 82 private OffsetDateTime TEST_2008_6_30_11_30_59_000000500; 86 …TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, … in setUp() 91 assertImmutable(OffsetDateTime.class); in test_immutable() 112 OffsetDateTime a = OffsetDateTime.of(localDateTime, offset); in test_get_same() 125 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameLocal() 126 OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PTWO); in test_withOffsetSameLocal() 133 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameLocal_noChange() 134 OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PONE); in test_withOffsetSameLocal_noChange() 140 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameInstant_noChange() [all …]
|
D | TestOffsetDateTime_instants.java | 69 import java.time.OffsetDateTime; 88 OffsetDateTime.ofInstant((Instant) null, OFFSET_PONE); in factory_ofInstant_nullInstant() 94 OffsetDateTime.ofInstant(instant, (ZoneOffset) null); in factory_ofInstant_nullOffset() 100 OffsetDateTime test = OffsetDateTime.ofInstant(instant, OFFSET_PONE); in factory_ofInstant_allSecsInDay() 112 …OffsetDateTime expected = OffsetDateTime.of(LocalDate.of(1970, 1, 1), LocalTime.of(0, 0, 0, 0), Zo… in factory_ofInstant_allDaysInCycle() 115 OffsetDateTime test = OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in factory_ofInstant_allDaysInCycle() 136 OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in factory_ofInstant_tooLow() 149 OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in factory_ofInstant_tooBig() 158 OffsetDateTime test = OffsetDateTime.ofInstant(instant, OFFSET_MIN); in factory_ofInstant_minWithMinOffset() 174 OffsetDateTime test = OffsetDateTime.ofInstant(instant, OFFSET_MAX); in factory_ofInstant_minWithMaxOffset() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKOffsetDateTime.java | 119 import java.time.OffsetDateTime; 163 private static OffsetDateTime TEST_2008_6_30_11_30_59_000000500; 167 … TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_PONE); in setUp() 173 …oralAccessor[] array = {TEST_2008_6_30_11_30_59_000000500, OffsetDateTime.MIN, OffsetDateTime.MAX}; in samples() 229 check(OffsetDateTime.MIN, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, ZoneOffset.MAX); in constant_MIN() 234 check(OffsetDateTime.MAX, Year.MAX_VALUE, 12, 31, 23, 59, 59, 999999999, ZoneOffset.MIN); in constant_MAX() 242 OffsetDateTime expected = OffsetDateTime.now(Clock.systemDefaultZone()); in now() 243 OffsetDateTime test = OffsetDateTime.now(); in now() 247 expected = OffsetDateTime.now(Clock.systemDefaultZone()); in now() 248 test = OffsetDateTime.now(); in now() [all …]
|
D | TCKZoneOffset.java | 79 import java.time.OffsetDateTime; 597 OffsetDateTime offsetDateTime_target = zonedDateTime_target.toOffsetDateTime(); 598 … OffsetDateTime offsetDateTime_result = (OffsetDateTime)(base.adjustInto(offsetDateTime_target)); 607 …OffsetDateTime offsetDateTime_target = OffsetDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10… 608 … OffsetDateTime offsetDateTime_result = (OffsetDateTime)base.adjustInto(offsetDateTime_target);
|
D | TCKInstant.java | 88 import java.time.OffsetDateTime; 446 …{Instant.ofEpochSecond(10, 200), OffsetDateTime.of(1970, 1, 1, 0, 0, 20, 10, ZoneOffset.UTC), Offs… 447 …{Instant.ofEpochSecond(10, 200), OffsetDateTime.of(1970, 1, 1, 0, 0, 20, 10, OFFSET_PTWO), OffsetD… 1834 OffsetDateTime end = start.plusSeconds(2).atOffset(ZoneOffset.ofHours(2)); 1866 OffsetDateTime test = instant.atOffset(ZoneOffset.ofHours(1));
|
/libcore/ojluni/annotations/hiddenapi/java/time/ |
D | OffsetDateTime.java | 68 public final class OffsetDateTime class 71 java.lang.Comparable<java.time.OffsetDateTime>, 75 private OffsetDateTime(java.time.LocalDateTime dateTime, java.time.ZoneOffset offset) { in OffsetDateTime() method in OffsetDateTime 79 public static java.util.Comparator<java.time.OffsetDateTime> timeLineOrder() { in timeLineOrder() 84 java.time.OffsetDateTime datetime1, java.time.OffsetDateTime datetime2) { in compareInstant() 88 public static java.time.OffsetDateTime now() { in now() 92 public static java.time.OffsetDateTime now(java.time.ZoneId zone) { in now() 96 public static java.time.OffsetDateTime now(java.time.Clock clock) { in now() 100 public static java.time.OffsetDateTime of( in of() 105 public static java.time.OffsetDateTime of( in of() [all …]
|
/libcore/ojluni/src/main/java/java/time/ |
D | OffsetDateTime.java | 122 public final class OffsetDateTime class 123 implements Temporal, TemporalAdjuster, Comparable<OffsetDateTime>, Serializable { 132 public static final OffsetDateTime MIN = LocalDateTime.MIN.atOffset(ZoneOffset.MAX); 140 public static final OffsetDateTime MAX = LocalDateTime.MAX.atOffset(ZoneOffset.MIN); 155 public static Comparator<OffsetDateTime> timeLineOrder() { in timeLineOrder() 156 return OffsetDateTime::compareInstant; in timeLineOrder() 167 private static int compareInstant(OffsetDateTime datetime1, OffsetDateTime datetime2) { in compareInstant() 205 public static OffsetDateTime now() { in now() 222 public static OffsetDateTime now(ZoneId zone) { in now() 238 public static OffsetDateTime now(Clock clock) { in now() [all …]
|
D | Ser.java | 196 ((OffsetDateTime) object).writeExternal(out); in writeInternal() 265 case OFFSET_DATE_TIME_TYPE: return OffsetDateTime.readExternal(in); in readInternal()
|
D | ZonedDateTime.java | 1230 } else if (adjuster instanceof OffsetDateTime) { in with() 1231 OffsetDateTime odt = (OffsetDateTime) adjuster; in with() 2149 public OffsetDateTime toOffsetDateTime() { in toOffsetDateTime() 2150 return OffsetDateTime.of(dateTime, offset); in toOffsetDateTime()
|
D | LocalDateTime.java | 446 } else if (temporal instanceof OffsetDateTime) { in from() 447 return ((OffsetDateTime) temporal).toLocalDateTime(); in from() 1759 public OffsetDateTime atOffset(ZoneOffset offset) { in atOffset() 1760 return OffsetDateTime.of(this, offset); in atOffset()
|
D | OffsetTime.java | 1213 public OffsetDateTime atDate(LocalDate date) { in atDate() 1214 return OffsetDateTime.of(date, time, offset); in atDate()
|
D | Instant.java | 1188 public OffsetDateTime atOffset(ZoneOffset offset) { in atOffset() 1189 return OffsetDateTime.ofInstant(this, offset); in atOffset()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | OffsetDateTimeTest.java | 19 import java.time.OffsetDateTime; 34 private static final OffsetDateTime ODT = 35 OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 6, ZoneOffset.UTC); 43 assertEquals(OffsetDateTime.of(2000, 1, 2, 4, 4, 5, 6, ZoneOffset.UTC), in test_plus() 45 assertEquals(OffsetDateTime.of(2000, 1, 3, 2, 4, 5, 6, ZoneOffset.UTC), in test_plus() 47 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 5, 5, 6, ZoneOffset.UTC), in test_plus() 49 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 5, 5, 6, ZoneOffset.UTC), in test_plus() 51 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 1_000_006, ZoneOffset.UTC), in test_plus() 53 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 7, ZoneOffset.UTC), in test_plus()
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKOffsetDateTimeSerialization.java | 66 import java.time.OffsetDateTime; 80 private OffsetDateTime TEST_2008_6_30_11_30_59_000000500; 84 … TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_PONE); in setUp() 91 assertSerializable(OffsetDateTime.MIN); in test_serialization() 92 assertSerializable(OffsetDateTime.MAX); in test_serialization() 111 assertSerializedBySer(OffsetDateTime.of(ldt, ZoneOffset.ofHours(1)), bytes); in test_serialization_format() 116 assertNotSerializable(OffsetDateTime.class); in test_invalid_serialform()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestJapaneseChronoImpl.java | 63 import java.time.OffsetDateTime; 108 OffsetDateTime jodt = OffsetDateTime.of(isoStartDate, LocalTime.MIN, ZoneOffset.UTC); in test_JapaneseChrono_vsCalendar() 135 … OffsetDateTime jodt = OffsetDateTime.of(LocalDate.from(jd), LocalTime.MIN, ZoneOffset.UTC); in test_dayOfYearVsCalendar()
|
D | TestUmmAlQuraChronology.java | 42 import java.time.OffsetDateTime; 656 …{OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), HijrahChronology.INSTANCE.date(1433, 4, … in data_zonedDateTime() 689 OffsetDateTime offsetDateTime = OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO); in test_Instant_zonedDateTime() 709 …{OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), HijrahChronology.INSTANCE.date(1433, 4, … in data_localDateTime()
|
/libcore/luni/src/test/java/libcore/java/time/zone/ |
D | ZoneOffsetTransitionTest.java | 21 import java.time.OffsetDateTime; 43 OffsetDateTime.of(time, offsetP1).toEpochSecond(), in test_toEpochSeconds()
|
/libcore/luni/src/test/java/libcore/java/time/format/ |
D | DateTimeFormatterBuilderTest.java | 22 import java.time.OffsetDateTime; 67 formatter.format(OffsetDateTime.now(ZoneOffset.UTC)); in test_appendZoneRegionId_format_offset()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKInstantPrinterParser.java | 67 import java.time.OffsetDateTime; 253 Instant expected = OffsetDateTime.of(1970, 2, 4, 0, 0, 0, 0, ZoneOffset.UTC).toInstant(); in test_parse_endOfDay() 265 …Instant expected = OffsetDateTime.of(1970, 2, 3, 23, 59, 59, 123456789, ZoneOffset.UTC).toInstant(… in test_parse_leapSecond()
|
D | TCKOffsetPrinterParser.java | 65 import java.time.OffsetDateTime; 318 OffsetDateTime odt = OffsetDateTime.of(ldt, offset); in test_print_localized()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeFormatter.java | 75 import java.time.OffsetDateTime; 120 assertGoodErrorDate(OffsetDateTime::from, "OffsetDateTime"); in test_parse_errorMessage() 136 assertGoodErrorTime(OffsetDateTime::from, "OffsetDateTime"); in test_parse_errorMessage()
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 29 import java.time.OffsetDateTime; 201 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testTime() 231 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testZoneId() 251 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testInstant()
|
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestIsoWeekFields.java | 33 import java.time.OffsetDateTime; 75 assertEquals(weekField.isSupportedBy(OffsetDateTime.MAX), true); in test_WOWBY_isSupportedBy() 116 assertEquals(yearField.isSupportedBy(OffsetDateTime.MAX), true); in test_WBY_isSupportedBy()
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/ |
D | TCKZoneRules.java | 78 import java.time.OffsetDateTime; 1032 …OffsetDateTime before_time_of_stdOffsetTransition1 = OffsetDateTime.of(time_of_stdOffsetTransition… in test_of() 1033 …OffsetDateTime after_time_of_stdOffsetTransition1 = OffsetDateTime.of(time_of_stdOffsetTransition1… in test_of() 1037 …OffsetDateTime before_time_of_wallOffsetTransition1 = OffsetDateTime.of(time_of_wallOffsetTransit… in test_of() 1038 …OffsetDateTime after_time_of_wallOffsetTransition1 = OffsetDateTime.of(time_of_wallOffsetTransiti… in test_of() 1042 …OffsetDateTime before_time_of_wallOffsetTransition2 = OffsetDateTime.of(time_of_wallOffsetTransit… in test_of() 1043 …OffsetDateTime after_time_of_wallOffsetTransition2 = OffsetDateTime.of(time_of_wallOffsetTransiti… in test_of() 1047 …OffsetDateTime before_time_of_wallOffsetTransition3 = OffsetDateTime.of(time_of_wallOffsetTransit… in test_of() 1048 …OffsetDateTime after_time_of_wallOffsetTransition3 = OffsetDateTime.of(time_of_wallOffsetTransiti… in test_of()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKMinguoChronology.java | 71 import java.time.OffsetDateTime; 415 …{OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra… in data_localDateTime() 448 …{OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra… in data_zonedDateTime() 481 OffsetDateTime offsetDateTime = OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO); in test_Instant_zonedDateTime()
|