/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; 465 assertEquals(ZoneOffset.from(ZonedDateTime.of(LocalDateTime.of(LocalDate.of(2007, 7, 15), in test_factory_CalendricalObject() 613 …ZonedDateTime zonedDateTime_target = ZonedDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10, 1… 614 … ZonedDateTime zonedDateTime_result = (ZonedDateTime)(base.adjustInto(zonedDateTime_target)); 632 ZonedDateTime zonedDateTime_target = offsetDateTime_target.toZonedDateTime(); 633 … ZonedDateTime zonedDateTime_result = (ZonedDateTime)(base.adjustInto(zonedDateTime_target));
|
/libcore/ojluni/src/main/java/java/time/ |
D | ZonedDateTime.java | 158 public final class ZonedDateTime class 193 public static ZonedDateTime now() { in now() 210 public static ZonedDateTime now(ZoneId zone) { in now() 226 public static ZonedDateTime now(Clock clock) { in now() 259 public static ZonedDateTime of(LocalDate date, LocalTime time, ZoneId zone) { in of() 287 public static ZonedDateTime of(LocalDateTime localDateTime, ZoneId zone) { in of() 331 public static ZonedDateTime of( in of() 361 …public static ZonedDateTime ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferred… in ofLocal() 365 return new ZonedDateTime(localDateTime, (ZoneOffset) zone, zone); in ofLocal() 383 return new ZonedDateTime(localDateTime, offset, zone); in ofLocal() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKFormatStyle.java | 62 import java.time.ZonedDateTime; 102 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.FULL, "Tuesda… in data_formatStyle() 103 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.LONG, "2 Octo… in data_formatStyle() 104 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.MEDIUM, "2 Oc… in data_formatStyle() 105 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), ZONEID_PARIS), FormatStyle.SHORT, "02/10… in data_formatStyle() 107 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.FULL, "Tuesday… in data_formatStyle() 108 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.LONG, "2 Octob… in data_formatStyle() 109 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.MEDIUM, "2 Oct… in data_formatStyle() 110 …{ZonedDateTime.of(LocalDateTime.of(2001, 10, 2, 1, 2, 3), OFFSET_PTWO), FormatStyle.SHORT, "02/10/… in data_formatStyle()
|
D | TCKDTFParsedInstant.java | 31 import java.time.ZonedDateTime; 54 private ZonedDateTime zdt1, zdt2; 174 zdt1 = ZonedDateTime.ofInstant(ldt, offset, zone); in testWithZoneWithOffset() 175 zdt2 = ZonedDateTime.parse(zdtString, dtFormatter); in testWithZoneWithOffset() 182 …{"28 Oct 00:45:00 2012 Europe/Berlin", ZonedDateTime.of(2012, 10, 28, 0, 45, 0, 0, EUROPE_BERLIN)}, in data_parse_WithZone_WithoutOffset() 183 …{"28 Oct 01:45:00 2012 Europe/Berlin", ZonedDateTime.of(2012, 10, 28, 1, 45, 0, 0, EUROPE_BERLIN)}, in data_parse_WithZone_WithoutOffset() 184 …{"28 Oct 02:45:00 2012 Europe/Berlin", ZonedDateTime.of(2012, 10, 28, 2, 45, 0, 0, EUROPE_BERLIN)}, in data_parse_WithZone_WithoutOffset() 185 …{"28 Oct 03:45:00 2012 Europe/Berlin", ZonedDateTime.of(2012, 10, 28, 3, 45, 0, 0, EUROPE_BERLIN)}, in data_parse_WithZone_WithoutOffset() 186 …{"28 Oct 04:45:00 2012 Europe/Berlin", ZonedDateTime.of(2012, 10, 28, 4, 45, 0, 0, EUROPE_BERLIN)}, in data_parse_WithZone_WithoutOffset() 188 …{"28 Oct 01:45:00 2012 Asia/Istanbul", ZonedDateTime.of(2012, 10, 28, 1, 45, 0, 0, ASIA_ISTANBUL)}, in data_parse_WithZone_WithoutOffset() [all …]
|
D | TCKLocalizedOffsetIdPrinterParser.java | 26 import java.time.ZonedDateTime; 41 String date = formatter.format(ZonedDateTime.now(ZoneOffset.UTC)); in test_localized_offset_parse()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeParsing.java | 79 import java.time.ZonedDateTime; 132 …{LOCALFIELDS_ZONEID, "2014-06-30 01:02:03 Europe/Paris", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0,… in data_instantZones() 133 …{LOCALFIELDS_ZONEID, "2014-06-30 01:02:03 +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFFSE… in data_instantZones() 134 …{LOCALFIELDS_OFFSETID, "2014-06-30 01:02:03 +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFF… in data_instantZones() 135 … {LOCALFIELDS_WITH_PARIS, "2014-06-30 01:02:03", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, PARIS)}, in data_instantZones() 136 …{LOCALFIELDS_WITH_0230, "2014-06-30 01:02:03", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, OFFSET_02… in data_instantZones() 137 …{INSTANT_WITH_PARIS, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.… in data_instantZones() 138 …{INSTANT_WITH_0230, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.U… in data_instantZones() 139 …{INSTANT_WITH_NEW_YORK, "2020-11-01T05:00:00Z", ZonedDateTime.of(2020, 11, 1, 5, 0, 0, 0, ZoneOffs… in data_instantZones() 140 …{INSTANT_WITH_NEW_YORK, "2020-11-01T06:00:00Z", ZonedDateTime.of(2020, 11, 1, 6, 0, 0, 0, ZoneOffs… in data_instantZones() [all …]
|
D | TestUnicodeExtension.java | 41 import java.time.ZonedDateTime; 90 private static final ZonedDateTime ZDT = ZonedDateTime.of(2017, 8, 10, 15, 15, 0, 0, AMLA); 862 assertEquals(dtf.parse(formatted, ZonedDateTime::from), in test_localizedBy() 886 assertEquals(dtf.parse(formatted, ZonedDateTime::from), in test_withLocale() 912 assertEquals(dtf.parse(formatted, ZonedDateTime::from), in test_ofPattern() 926 assertEquals(dtf.parse(formatted, ZonedDateTime::from), in test_toFormatter()
|
D | TestZoneTextPrinterParser.java | 32 import java.time.ZonedDateTime; 77 ZonedDateTime zdt = ZonedDateTime.now(); in test_printText() 148 …private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String ex… in printText()
|
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/ojluni/src/test/java/time/test/java/time/ |
D | TestZonedDateTime.java | 66 import java.time.ZonedDateTime; 81 assertImmutable(ZonedDateTime.class); in test_immutable() 89 ZonedDateTime end = ZonedDateTime.of(LocalDateTime.MAX, sanJose); in test_duration() 90 ZonedDateTime start = end.withZoneSameLocal(tokyo); in test_duration()
|
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/ |
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/luni/src/test/java/libcore/java/time/format/ |
D | DateTimeFormatterBuilderTest.java | 25 import java.time.ZonedDateTime; 58 formatter.format(ZonedDateTime.now(ZoneId.of("Europe/London")))); in test_appendZoneRegionId_format() 60 formatter.format(ZonedDateTime.now(ZoneId.of("UTC")))); in test_appendZoneRegionId_format() 102 ZonedDateTime.now(ZoneId.of("America/Los_Angeles")))); in test_appendGenericZoneText() 109 ZonedDateTime.now(ZoneId.of("America/Los_Angeles")))); in test_appendGenericZoneText()
|
D | DateTimeFormatterTest.java | 24 import java.time.ZonedDateTime; 86 ZonedDateTime zonedDateTime = Instant.EPOCH.atZone(ZoneId.of("UTC")); in test_format_locale_agq() 94 ZonedDateTime zonedDateTime = Instant.EPOCH.atZone(ZoneId.of("UTC")); in test_format_locale_en_US()
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
D | TestFormatter.java | 33 import java.time.ZonedDateTime; 231 if (zdt instanceof ZonedDateTime) { in testDate() 232 test(fmtStr, locale, expected, ((ZonedDateTime)zdt).toOffsetDateTime()); in testDate() 243 if (zdt instanceof ZonedDateTime) { in testTime() 244 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testTime() 267 if (zdt instanceof ZonedDateTime) { in testZoneId() 268 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testZoneId() 287 if (zdt instanceof ZonedDateTime) { in testInstant() 288 OffsetDateTime odt = ((ZonedDateTime)zdt).toOffsetDateTime(); in testInstant()
|
/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 | ChronoZonedDateTimeTest.java | 31 import java.time.ZonedDateTime; 76 ZonedDateTime epochTime = ZonedDateTime.ofInstant(Instant.EPOCH, ZoneId.of("UTC")); in testFormat()
|
D | JapaneseChronologyTest.java | 29 import java.time.ZonedDateTime; 49 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/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 | 85 import java.time.ZonedDateTime; 384 public ZonedDateTime zonedDateTime(TemporalAccessor temporal) { in zonedDateTime() 385 return ZonedDateTime.from(temporal); in zonedDateTime() 399 public ZonedDateTime zonedDateTime(Instant instant, ZoneId zone) { in zonedDateTime() 400 return ZonedDateTime.ofInstant(instant, zone); in zonedDateTime()
|