Home
last modified time | relevance | path

Searched refs:ZonedDateTime (Results 1 – 25 of 50) sorted by relevance

12

/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKZonedDateTime.java118 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 …]
DTCKZoneOffset.java78 import java.time.ZonedDateTime;
445 assertEquals(ZoneOffset.from(ZonedDateTime.of(LocalDateTime.of(LocalDate.of(2007, 7, 15), in test_factory_CalendricalObject()
593ZonedDateTime zonedDateTime_target = ZonedDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10, 1…
594ZonedDateTime zonedDateTime_result = (ZonedDateTime)(base.adjustInto(zonedDateTime_target));
612 ZonedDateTime zonedDateTime_target = offsetDateTime_target.toZonedDateTime();
613ZonedDateTime zonedDateTime_result = (ZonedDateTime)(base.adjustInto(zonedDateTime_target));
/libcore/ojluni/src/main/java/java/time/
DZonedDateTime.java158 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 …]
DSer.java190 ((ZonedDateTime) object).writeExternal(out); in writeInternal()
261 case ZONE_DATE_TIME_TYPE: return ZonedDateTime.readExternal(in); in readInternal()
DOffsetDateTime.java1687 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/
DTCKFormatStyle.java62 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()
DTCKOffsetPrinterParser.java68 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()
DTCKZoneIdPrinterParser.java70 import java.time.ZonedDateTime;
116 ZonedDateTime zdt = ldt.atZone(zone); in test_print()
124 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_VV()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestDateTimeParsing.java76 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 …]
DTestDateTimeFormatter.java81 import java.time.ZonedDateTime;
121 assertGoodErrorDate(ZonedDateTime::from, "ZonedDateTime"); in test_parse_errorMessage()
137 assertGoodErrorTime(ZonedDateTime::from, "ZonedDateTime"); in test_parse_errorMessage()
DTestZoneTextPrinterParser.java30 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()
DAbstractTestPrinterParser.java65 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/
DZonedDateTimeTest.java25 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()
DDurationTest.java27 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/
DTCKZonedDateTimeSerialization.java72 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()
117ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneId.of("Europ… in test_serialization_format_zoneId()
138ZonedDateTime 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()
DTCKClockSerialization.java70 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/time/
DTestZonedDateTime.java62 import java.time.ZonedDateTime;
74 assertImmutable(ZonedDateTime.class); in test_immutable()
DTestClock_Tick.java70 import java.time.ZonedDateTime;
82 …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/
DTestFormatter.java30 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/luni/src/test/java/libcore/java/time/chrono/
DIsoChronologyTest.java26 import java.time.ZonedDateTime;
100 ZonedDateTime zonedDateTime = ZonedDateTime in test_zonedDateTime()
105 ZonedDateTime result = IsoChronology.INSTANCE in test_zonedDateTime()
DJapaneseChronologyTest.java24 import java.time.ZonedDateTime;
43 ZonedDateTime zonedDateTime = ZonedDateTime in test_zonedDateTime()
/libcore/luni/src/test/java/libcore/java/util/
DGregorianCalendarTest.java22 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/
DDateTimeFormatterBuilderTest.java25 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/
DTCKChronoZonedDateTimeSerialization.java61 import java.time.ZonedDateTime;
98ZonedDateTime 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/
DIsoChronology.java83 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()

12