/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKZonedDateTime.java | 118 import java.time.ZonedDateTime; 160 private ZonedDateTime TEST_DATE_TIME; 161 private ZonedDateTime TEST_DATE_TIME_PARIS; 166 TEST_DATE_TIME = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); in setUp() 167 TEST_DATE_TIME_PARIS = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS); in setUp() 231 ZonedDateTime expected = ZonedDateTime.now(Clock.systemDefaultZone()); in now() 232 ZonedDateTime test = ZonedDateTime.now(); in now() 236 expected = ZonedDateTime.now(Clock.systemDefaultZone()); in now() 237 test = ZonedDateTime.now(); in now() 248 ZonedDateTime.now((ZoneId) null); [all …]
|
D | TCKZoneOffset.java | 78 import java.time.ZonedDateTime; 445 assertEquals(ZoneOffset.from(ZonedDateTime.of(LocalDateTime.of(LocalDate.of(2007, 7, 15), in test_factory_CalendricalObject() 593 …ZonedDateTime zonedDateTime_target = ZonedDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10, 1… 594 … ZonedDateTime zonedDateTime_result = (ZonedDateTime)(base.adjustInto(zonedDateTime_target)); 612 ZonedDateTime zonedDateTime_target = offsetDateTime_target.toZonedDateTime(); 613 … ZonedDateTime zonedDateTime_result = (ZonedDateTime)(base.adjustInto(zonedDateTime_target));
|
/libcore/ojluni/src/main/java/java/time/ |
D | ZonedDateTime.java | 158 public final class ZonedDateTime class 192 public static ZonedDateTime now() { in now() 209 public static ZonedDateTime now(ZoneId zone) { in now() 225 public static ZonedDateTime now(Clock clock) { in now() 258 public static ZonedDateTime of(LocalDate date, LocalTime time, ZoneId zone) { in of() 286 public static ZonedDateTime of(LocalDateTime localDateTime, ZoneId zone) { in of() 330 public static ZonedDateTime of( in of() 360 …public static ZonedDateTime ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferred… in ofLocal() 364 return new ZonedDateTime(localDateTime, (ZoneOffset) zone, zone); in ofLocal() 382 return new ZonedDateTime(localDateTime, offset, zone); in ofLocal() [all …]
|
D | Ser.java | 190 ((ZonedDateTime) object).writeExternal(out); in writeInternal() 261 case ZONE_DATE_TIME_TYPE: return ZonedDateTime.readExternal(in); in readInternal()
|
D | OffsetDateTime.java | 1687 public ZonedDateTime atZoneSameInstant(ZoneId zone) { in atZoneSameInstant() 1688 return ZonedDateTime.ofInstant(dateTime, offset, zone); in atZoneSameInstant() 1715 public ZonedDateTime atZoneSimilarLocal(ZoneId zone) { in atZoneSimilarLocal() 1716 return ZonedDateTime.ofLocal(dateTime, zone, offset); in atZoneSimilarLocal() 1742 public ZonedDateTime toZonedDateTime() { in toZonedDateTime() 1743 return ZonedDateTime.of(dateTime, offset); in toZonedDateTime()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKFormatStyle.java | 62 import java.time.ZonedDateTime; 97 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.FULL, "Tuesda… in data_formatStyle() 98 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.LONG, "2 Octo… in data_formatStyle() 99 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.MEDIUM, "2 Oc… in data_formatStyle() 100 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.SHORT, "02/10… in data_formatStyle() 102 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.FULL, "Tuesday… in data_formatStyle() 103 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.LONG, "2 Octob… in data_formatStyle() 104 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.MEDIUM, "2 Oct… in data_formatStyle() 105 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.SHORT, "02/10/… in data_formatStyle()
|
D | TCKOffsetPrinterParser.java | 68 import java.time.ZonedDateTime; 235 ZonedDateTime zdt = ldt.atZone(zone); in test_print() 257 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_X() 285 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_x() 296 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_Z() 309 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_Z() 319 ZonedDateTime zdt = ldt.atZone(offset); in test_print_localized()
|
D | TCKDateTimeFormatter.java | 87 import java.time.ZonedDateTime; 284 ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS); in data_format_withZone_withChronology() 613 …TemporalAccessor result = test.parseBest("2011-06-30 12:30+03:00", ZonedDateTime::from, LocalDateT… in test_parseBest_firstOption() 615 assertEquals(result, ZonedDateTime.of(ldt, ZoneOffset.ofHours(3))); in test_parseBest_firstOption() 621 … TemporalAccessor result = test.parseBest("2011-06-30", ZonedDateTime::from, LocalDate::from); in test_parseBest_secondOption() 629 test.parseBest("2011-06-XX", ZonedDateTime::from, LocalDateTime::from); in test_parseBest_String_parseError() 643 …3456789012345678901234567890123456789012345678901234567890123456789", ZonedDateTime::from, LocalDa… in test_parseBest_String_parseErrorLongText() 657 test.parseBest("ONE30SomethingElse", ZonedDateTime::from, LocalDate::from); in test_parseBest_String_parseIncomplete() 670 test.parseBest((String) null, ZonedDateTime::from, LocalDate::from); in test_parseBest_String_nullText()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeParsing.java | 76 import java.time.ZonedDateTime; 121 …{LOCALFIELDS_ZONEID, "2014-06-30 01:02:03 Europe/Paris", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0,… in data_instantZones() 122 …{LOCALFIELDS_ZONEID, "2014-06-30 01:02:03 +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFFSE… in data_instantZones() 123 …{LOCALFIELDS_OFFSETID, "2014-06-30 01:02:03 +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFF… in data_instantZones() 124 … {LOCALFIELDS_WITH_PARIS, "2014-06-30 01:02:03", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, PARIS)}, in data_instantZones() 125 …{LOCALFIELDS_WITH_0230, "2014-06-30 01:02:03", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFFSET_02… in data_instantZones() 126 …{INSTANT_WITH_PARIS, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.… in data_instantZones() 127 …{INSTANT_WITH_0230, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.U… in data_instantZones() 128 …{INSTANT_OFFSETID, "2014-06-30T01:02:03Z +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOf… in data_instantZones() 129 …{INSTANT_OFFSETSECONDS, "2014-06-30T01:02:03Z 9000", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, Zon… in data_instantZones() [all …]
|
D | TestZoneTextPrinterParser.java | 30 import java.time.ZonedDateTime; 75 ZonedDateTime zdt = ZonedDateTime.now(); in test_printText() 113 …private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String ex… in printText()
|
D | TestDateTimeFormatter.java | 81 import java.time.ZonedDateTime; 121 assertGoodErrorDate(ZonedDateTime::from, "ZonedDateTime"); in test_parse_errorMessage() 137 assertGoodErrorTime(ZonedDateTime::from, "ZonedDateTime"); in test_parse_errorMessage()
|
D | AbstractTestPrinterParser.java | 65 import java.time.ZonedDateTime; 95 … dta = ZonedDateTime.of(LocalDateTime.of(2011, 6, 30, 12, 30, 40, 0), ZoneId.of("Europe/Paris")); in setUp()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | ZonedDateTimeTest.java | 25 import java.time.ZonedDateTime; 100 ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(localDateTime, offset, zone); in checkOfInstant() 119 ZonedDateTime.ofInstant(null, OFFSET_P1, ZONE_VIENNA); in test_ofInstant_localDateTime_null() 124 ZonedDateTime.ofInstant(LDT_P1, null, ZONE_VIENNA); in test_ofInstant_offset_null() 129 ZonedDateTime.ofInstant(LDT_P1, OFFSET_P1, null); in test_ofInstant_zone_null() 170 ZonedDateTime zonedDateTime = ZonedDateTime.ofLocal(localDateTime, zone, preferredOffset); in checkOfLocal() 182 ZonedDateTime.ofLocal(null, ZONE_VIENNA, OFFSET_P1); in test_ofLocal_localDateTime_null() 187 ZonedDateTime.ofLocal(LDT_P1, null, OFFSET_P1); in test_ofLocal_zone_null()
|
D | DurationTest.java | 27 import java.time.ZonedDateTime; 84 { ZonedDateTime.of(LocalDateTime.MAX, ZoneOffset.UTC ), Duration.ofNanos(1) }, in test_addTo_exceeds() 112 { ZonedDateTime.of(LocalDateTime.MIN, ZoneOffset.UTC ), Duration.ofNanos(1) }, in test_subtractFrom_exceeds()
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKZonedDateTimeSerialization.java | 72 import java.time.ZonedDateTime; 84 private ZonedDateTime TEST_DATE_TIME; 90 TEST_DATE_TIME = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); in setUp() 117 …ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneId.of("Europ… in test_serialization_format_zoneId() 138 …ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneOffset.ofHou… in test_serialization_format_zoneOffset() 144 assertNotSerializable(ZonedDateTime.class); in test_invalid_serialform()
|
D | TCKClockSerialization.java | 70 import java.time.ZonedDateTime; 86 …private static final ZonedDateTime ZDT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(Zon…
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 30 import java.time.ZonedDateTime; 188 if (zdt instanceof ZonedDateTime) { in testDate() 189 test(fmtStr, locale, expected, ((ZonedDateTime)zdt).toOffsetDateTime()); in testDate() 200 if (zdt instanceof ZonedDateTime) { in testTime() 201 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testTime() 230 if (zdt instanceof ZonedDateTime) { in testZoneId() 231 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testZoneId() 250 if (zdt instanceof ZonedDateTime) { in testInstant() 251 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testInstant()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestZonedDateTime.java | 62 import java.time.ZonedDateTime; 74 assertImmutable(ZonedDateTime.class); in test_immutable()
|
D | TestClock_Tick.java | 70 import java.time.ZonedDateTime; 82 …private static final ZonedDateTime ZDT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(Zon…
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | IsoChronologyTest.java | 26 import java.time.ZonedDateTime; 100 ZonedDateTime zonedDateTime = ZonedDateTime in test_zonedDateTime() 105 ZonedDateTime result = IsoChronology.INSTANCE in test_zonedDateTime()
|
D | JapaneseChronologyTest.java | 26 import java.time.ZonedDateTime; 46 ZonedDateTime zonedDateTime = ZonedDateTime in test_zonedDateTime()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | GregorianCalendarTest.java | 22 import java.time.ZonedDateTime; 291 ZonedDateTime zdt = ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"); in test_fromZonedDateTime() 305 ZonedDateTime[] invalidValues = { in test_fromZonedDateTime_invalidValues() 306 ZonedDateTime.of(LocalDateTime.MAX, gmt), in test_fromZonedDateTime_invalidValues() 307 ZonedDateTime.ofInstant(Instant.ofEpochMilli(Long.MAX_VALUE).plusMillis(1), gmt), in test_fromZonedDateTime_invalidValues() 308 ZonedDateTime.ofInstant(Instant.ofEpochMilli(Long.MIN_VALUE).minusMillis(1), gmt), in test_fromZonedDateTime_invalidValues() 309 ZonedDateTime.of(LocalDateTime.MAX, gmt) }; in test_fromZonedDateTime_invalidValues() 310 for (ZonedDateTime invalidValue : invalidValues) { in test_fromZonedDateTime_invalidValues() 323 ZonedDateTime zdt = calendar.toZonedDateTime(); in test_toZonedDateTime() 324 assertEquals(ZonedDateTime.parse("2007-12-03T10:15:30+01:00[Europe/Paris]"), zdt); in test_toZonedDateTime()
|
/libcore/luni/src/test/java/libcore/java/time/format/ |
D | DateTimeFormatterBuilderTest.java | 25 import java.time.ZonedDateTime; 56 formatter.format(ZonedDateTime.now(ZoneId.of("Europe/London")))); in test_appendZoneRegionId_format() 58 formatter.format(ZonedDateTime.now(ZoneId.of("UTC")))); in test_appendZoneRegionId_format()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/serial/ |
D | TCKChronoZonedDateTimeSerialization.java | 61 import java.time.ZonedDateTime; 98 … ZonedDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3).atZone(ZoneId.of("GMT+01:23")); in test_ChronoZonedDateTimeSerialization()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | IsoChronology.java | 83 import java.time.ZonedDateTime; 290 public ZonedDateTime zonedDateTime(TemporalAccessor temporal) { in zonedDateTime() 291 return ZonedDateTime.from(temporal); in zonedDateTime() 305 public ZonedDateTime zonedDateTime(Instant instant, ZoneId zone) { in zonedDateTime() 306 return ZonedDateTime.ofInstant(instant, zone); in zonedDateTime()
|