/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestOffsetDateTime.java | 69 import java.time.OffsetDateTime; 86 private OffsetDateTime TEST_2008_6_30_11_30_59_000000500; 90 …TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, … in setUp() 95 assertImmutable(OffsetDateTime.class); in test_immutable() 116 OffsetDateTime a = OffsetDateTime.of(localDateTime, offset); in test_get_same() 129 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameLocal() 130 OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PTWO); in test_withOffsetSameLocal() 137 …OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSE… in test_withOffsetSameLocal_noChange() 138 OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PONE); in test_withOffsetSameLocal_noChange() 144 …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 | 115 import java.time.OffsetDateTime; 159 private static OffsetDateTime TEST_2008_6_30_11_30_59_000000500; 163 … TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_PONE); in setUp() 169 …oralAccessor[] array = {TEST_2008_6_30_11_30_59_000000500, OffsetDateTime.MIN, OffsetDateTime.MAX}; in samples() 225 check(OffsetDateTime.MIN, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, ZoneOffset.MAX); in constant_MIN() 230 check(OffsetDateTime.MAX, Year.MAX_VALUE, 12, 31, 23, 59, 59, 999999999, ZoneOffset.MIN); in constant_MAX() 239 OffsetDateTime expected = OffsetDateTime.now(Clock.systemDefaultZone()); in now() 240 OffsetDateTime test = OffsetDateTime.now(); in now() 244 expected = OffsetDateTime.now(Clock.systemDefaultZone()); in now() 245 test = OffsetDateTime.now(); in now() [all …]
|
D | TCKZoneOffset.java | 79 import java.time.OffsetDateTime; 617 OffsetDateTime offsetDateTime_target = zonedDateTime_target.toOffsetDateTime(); 618 … OffsetDateTime offsetDateTime_result = (OffsetDateTime)(base.adjustInto(offsetDateTime_target)); 627 …OffsetDateTime offsetDateTime_target = OffsetDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10… 628 … OffsetDateTime offsetDateTime_result = (OffsetDateTime)base.adjustInto(offsetDateTime_target);
|
/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/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() 59 assertEquals(OffsetDateTime.of(2000, 1, 2, 2, 4, 5, 6, ZoneOffset.UTC), in test_minus_utc_offset() [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() 206 public static OffsetDateTime now() { in now() 223 public static OffsetDateTime now(ZoneId zone) { in now() 239 public static OffsetDateTime now(Clock clock) { in now() [all …]
|
D | Ser.java | 198 ((OffsetDateTime) object).writeExternal(out); in writeInternal() 283 case OFFSET_DATE_TIME_TYPE: return OffsetDateTime.readExternal(in); in readInternal()
|
D | LocalDateTime.java | 447 } else if (temporal instanceof OffsetDateTime) { in from() 448 return ((OffsetDateTime) temporal).toLocalDateTime(); in from() 1752 public OffsetDateTime atOffset(ZoneOffset offset) { in atOffset() 1753 return OffsetDateTime.of(this, offset); in atOffset()
|
D | ZonedDateTime.java | 1232 } else if (adjuster instanceof OffsetDateTime odt) { in with() 2162 public OffsetDateTime toOffsetDateTime() { in toOffsetDateTime() 2163 return OffsetDateTime.of(dateTime, offset); in toOffsetDateTime()
|
/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/tck/java/time/format/ |
D | TCKDTFParsedInstant.java | 28 import java.time.OffsetDateTime; 56 private OffsetDateTime odt1; 206 …{"2015-12-14T00:45:00-11:30", OffsetDateTime.of(2015, 12, 14, 0, 45, 0, 0, ZoneOffset.of("-11:30")… in data_parse_WithOffset_WithoutZone() 207 …{"2015-12-14T01:45:00-05:00", OffsetDateTime.of(2015, 12, 14, 1, 45, 0, 0, ZoneOffset.of("-05:00")… in data_parse_WithOffset_WithoutZone() 208 …{"2015-12-14T02:45:00-00:00", OffsetDateTime.of(2015, 12, 14, 2, 45, 0, 0, ZoneOffset.of("-00:00")… in data_parse_WithOffset_WithoutZone() 209 …{"2015-12-14T03:45:00+00:00", OffsetDateTime.of(2015, 12, 14, 3, 45, 0, 0, ZoneOffset.of("+00:00")… in data_parse_WithOffset_WithoutZone() 210 …{"2015-12-14T04:45:00+03:30", OffsetDateTime.of(2015, 12, 14, 4, 45, 0, 0, ZoneOffset.of("+03:30")… in data_parse_WithOffset_WithoutZone() 211 …{"2015-12-14T05:45:00+10:00", OffsetDateTime.of(2015, 12, 14, 5, 45, 0, 0, ZoneOffset.of("+10:00")… in data_parse_WithOffset_WithoutZone() 216 public void testWithOffsetWithoutZone(String odtString, OffsetDateTime expectedOTD) { in testWithOffsetWithoutZone() 218 odt1 = OffsetDateTime.parse(odtString, dtFormatter); in testWithOffsetWithoutZone()
|
D | TCKInstantPrinterParser.java | 67 import java.time.OffsetDateTime; 292 Instant expected = OffsetDateTime.of(1970, 2, 4, 0, 0, 0, 0, ZoneOffset.UTC).toInstant(); in test_parse_endOfDay() 304 …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; 557 OffsetDateTime odt = OffsetDateTime.of(ldt, offset); in test_print_localized()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestJapaneseChronoImpl.java | 65 import java.time.OffsetDateTime; 111 OffsetDateTime jodt = OffsetDateTime.of(isoStartDate, LocalTime.MIN, ZoneOffset.UTC); in test_JapaneseChrono_vsCalendar() 138 … 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/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeFormatter.java | 75 import java.time.OffsetDateTime; 125 assertGoodErrorDate(OffsetDateTime::from, "OffsetDateTime"); in test_parse_errorMessage() 141 assertGoodErrorTime(OffsetDateTime::from, "OffsetDateTime"); in test_parse_errorMessage() 208 … {OffsetDateTime.of(2000, 1, 1, 3, 3, 3, 0, ZoneOffset.ofTotalSeconds(60)), "z", "ZoneId"}, in exceptionCases()
|
/libcore/luni/src/test/java/libcore/java/time/format/ |
D | DateTimeFormatterBuilderTest.java | 22 import java.time.OffsetDateTime; 69 formatter.format(OffsetDateTime.now(ZoneOffset.UTC)); in test_appendZoneRegionId_format_offset()
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 32 import java.time.OffsetDateTime; 244 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testTime() 268 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testZoneId() 288 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testInstant()
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/ |
D | TCKZoneRules.java | 78 import java.time.OffsetDateTime; 1076 …OffsetDateTime before_time_of_stdOffsetTransition1 = OffsetDateTime.of(time_of_stdOffsetTransition… in test_of() 1077 …OffsetDateTime after_time_of_stdOffsetTransition1 = OffsetDateTime.of(time_of_stdOffsetTransition1… in test_of() 1081 …OffsetDateTime before_time_of_wallOffsetTransition1 = OffsetDateTime.of(time_of_wallOffsetTransit… in test_of() 1082 …OffsetDateTime after_time_of_wallOffsetTransition1 = OffsetDateTime.of(time_of_wallOffsetTransiti… in test_of() 1086 …OffsetDateTime before_time_of_wallOffsetTransition2 = OffsetDateTime.of(time_of_wallOffsetTransit… in test_of() 1087 …OffsetDateTime after_time_of_wallOffsetTransition2 = OffsetDateTime.of(time_of_wallOffsetTransiti… in test_of() 1091 …OffsetDateTime before_time_of_wallOffsetTransition3 = OffsetDateTime.of(time_of_wallOffsetTransit… in test_of() 1092 …OffsetDateTime after_time_of_wallOffsetTransition3 = OffsetDateTime.of(time_of_wallOffsetTransiti… in test_of()
|
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestIsoWeekFields.java | 35 import java.time.OffsetDateTime; 77 assertEquals(weekField.isSupportedBy(OffsetDateTime.MAX), true); in test_WOWBY_isSupportedBy() 118 assertEquals(yearField.isSupportedBy(OffsetDateTime.MAX), true); in test_WBY_isSupportedBy()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKIsoChronology.java | 66 import java.time.OffsetDateTime; 711 OffsetDateTime.of(y, m, d, h, min, s, 0, offset).toEpochSecond()); in test_epochSecond_1() 725 … OffsetDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 59, 0, ZoneOffset.MIN).toEpochSecond()); in test_epochSecond_max() 731 … OffsetDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, ZoneOffset.MAX).toEpochSecond()); in test_epochSecond_min() 774 … OffsetDateTime.of(IsoChronology.INSTANCE.date(era, y, m, d), LocalTime.of(h, min, s), offset) in test_era_epochSecond_1()
|
D | TCKChronology.java | 80 import java.time.OffsetDateTime; 386 OffsetDateTime.of(LocalDate.from(chronoLd), LocalTime.of(h, min, s), offset) in test_epochSecond() 414 OffsetDateTime.of(LocalDate.from(chronoLd), LocalTime.of(h, min, s), offset) in test_epochSecond()
|
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()
|