Home
last modified time | relevance | path

Searched refs:LocalDateTime (Results 1 – 25 of 84) sorted by relevance

1234

/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDTFParsedInstant.java27 import java.time.LocalDateTime;
55 private LocalDateTime ldt1;
66 {"1966-12-31T00:01:10", LocalDateTime.of(1966, 12, 31, 0, 1, 10)}, in data_parse_WithoutOffset_WithoutZone()
67 {"1970-01-01T00:00:00", LocalDateTime.of(1970, 1, 1, 0, 0, 0)}, in data_parse_WithoutOffset_WithoutZone()
68 {"2004-02-29T00:30:00", LocalDateTime.of(2004, 2, 29, 0, 30, 0)}, in data_parse_WithoutOffset_WithoutZone()
69 {"2015-12-31T23:59:59", LocalDateTime.of(2015, 12, 31, 23, 59, 59)} in data_parse_WithoutOffset_WithoutZone()
74 public void testWithoutZoneWithoutOffset(String ldtString, LocalDateTime expectedLDT) { in testWithoutZoneWithoutOffset()
76 ldt1 = LocalDateTime.parse(ldtString, dtFormatter); in testWithoutZoneWithoutOffset()
84LocalDateTime.of(2012, 10, 28, 1, 45, 0, 0), ZoneOffset.of("-02:30"), EUROPE_BERLIN}, in data_parse_WithZone_WithOffset()
86LocalDateTime.of(2012, 10, 28, 1, 45, 0, 0), ZoneOffset.of("-01:00"), EUROPE_BERLIN}, in data_parse_WithZone_WithOffset()
[all …]
DTCKFormatStyle.java59 import java.time.LocalDateTime;
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()
DTCKDateTimeTextPrinting.java67 import java.time.LocalDateTime;
141 LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0); in test_appendText2arg_format()
151 LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0); in test_appendText1arg_format()
176 LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0); in test_appendTextMap()
190 LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0); in test_appendTextMap_DOM()
202 LocalDateTime dt = LocalDateTime.of(2010, 2, 1, 0, 0); in test_appendTextMapIncomplete()
DTCKDateTimeFormatterBuilder.java74 import java.time.LocalDateTime;
596 ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.now(), ZoneId.of(input)); in test_appendZoneText_formatGenericTimeZonePatterns()
604 …{"yyyy DDD HH mm v", LocalDateTime.of(2015, Month.MARCH, 10, 12, 13), ZoneId.of("America/Los_Angel… in data_parseGenericTimeZonePatterns()
606 …{"yyyy DDD HH mm vvvv", LocalDateTime.of(2015, Month.MARCH, 10, 12, 13), ZoneId.of("America/Los_An… in data_parseGenericTimeZonePatterns()
608 …{"yyyy DDD HH mm v", LocalDateTime.of(2015, Month.NOVEMBER, 10, 12, 13), ZoneId.of("America/Los_An… in data_parseGenericTimeZonePatterns()
610 …{"yyyy DDD HH mm vvvv", LocalDateTime.of(2015, Month.NOVEMBER, 10, 12, 13), ZoneId.of("America/Los… in data_parseGenericTimeZonePatterns()
616 …public void test_appendZoneText_parseGenericTimeZonePatterns(String pattern, LocalDateTime ldt, Zo… in test_appendZoneText_parseGenericTimeZonePatterns()
626 {"yyyy-MM-dd HH:mm:ss z", LocalDateTime.of(2015, Month.NOVEMBER, 1, 0, 30), in data_formatNonGenericTimeZonePatterns_1()
628 {"yyyy-MM-dd HH:mm:ss z", LocalDateTime.of(2015, Month.NOVEMBER, 1, 1, 30), in data_formatNonGenericTimeZonePatterns_1()
630 {"yyyy-MM-dd HH:mm:ss z", LocalDateTime.of(2015, Month.NOVEMBER, 1, 2, 30), in data_formatNonGenericTimeZonePatterns_1()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalDateTime.java116 import java.time.LocalDateTime;
160 …private LocalDateTime TEST_2007_07_15_12_30_40_987654321 = LocalDateTime.of(2007, 7, 15, 12, 30, 4…
161 private LocalDateTime MAX_DATE_TIME;
162 private LocalDateTime MIN_DATE_TIME;
168 MAX_DATE_TIME = LocalDateTime.MAX; in setUp()
169 MIN_DATE_TIME = LocalDateTime.MIN; in setUp()
177 …oralAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, … in samples()
227 private void check(LocalDateTime test, int y, int m, int d, int h, int mi, int s, int n) { in check()
237 assertEquals(LocalDateTime.of(y, m, d, h, mi, s, n), test); in check()
240 private LocalDateTime createDateMidnight(int year, int month, int day) { in createDateMidnight()
[all …]
DTCKZonedDateTime.java109 import java.time.LocalDateTime;
157 private LocalDateTime TEST_PARIS_GAP_2008_03_30_02_30;
158 private LocalDateTime TEST_PARIS_OVERLAP_2008_10_26_02_30;
159 private LocalDateTime TEST_LOCAL_2008_06_30_11_30_59_500;
165 TEST_LOCAL_2008_06_30_11_30_59_500 = LocalDateTime.of(2008, 6, 30, 11, 30, 59, 500); in setUp()
168 TEST_PARIS_OVERLAP_2008_10_26_02_30 = LocalDateTime.of(2008, 10, 26, 2, 30); in setUp()
169 TEST_PARIS_GAP_2008_03_30_02_30 = LocalDateTime.of(2008, 3, 30, 2, 30); in setUp()
317 ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(1970, 1, 1, 12, 0), ZoneOffset.UTC);
387 LocalDateTime base = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500);
406 ZonedDateTime.of((LocalDateTime) null, ZONE_PARIS);
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/
DTestLocalDateTime.java67 import java.time.LocalDateTime;
81 …private LocalDateTime TEST_2007_07_15_12_30_40_987654321 = LocalDateTime.of(2007, 7, 15, 12, 30, 4…
86 assertImmutable(LocalDateTime.class); in test_immutable()
126 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2007); in test_withYear_int_noChange()
133 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMonth(7); in test_withMonth_int_noChange()
140 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfMonth(15); in test_withDayOfMonth_noChange()
146LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 1… in test_withDayOfYear_noChange()
152 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withHour(12); in test_withHour_noChange()
158 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(0); in test_withHour_toMidnight()
164 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(12); in test_withHour_toMidday()
[all …]
DTestZoneId.java71 import java.time.LocalDateTime;
236 …checkOffset(test.getRules(), LocalDateTime.of(2008, 3, 30, 0, 59, 59, 999999999), ZoneOffset.ofHou… in test_London_getOffsetInfo_toDST()
237 …checkOffset(test.getRules(), LocalDateTime.of(2008, 3, 30, 1, 30, 0, 0), ZoneOffset.ofHours(0), GA… in test_London_getOffsetInfo_toDST()
238 … checkOffset(test.getRules(), LocalDateTime.of(2008, 3, 30, 2, 0, 0, 0), ZoneOffset.ofHours(1), 1); in test_London_getOffsetInfo_toDST()
252 …checkOffset(test.getRules(), LocalDateTime.of(2008, 10, 26, 0, 59, 59, 999999999), ZoneOffset.ofHo… in test_London_getOffsetInfo_fromDST()
253 …checkOffset(test.getRules(), LocalDateTime.of(2008, 10, 26, 1, 30, 0, 0), ZoneOffset.ofHours(1), O… in test_London_getOffsetInfo_fromDST()
254 …checkOffset(test.getRules(), LocalDateTime.of(2008, 10, 26, 2, 0, 0, 0), ZoneOffset.ofHours(0), 1); in test_London_getOffsetInfo_fromDST()
259 final LocalDateTime dateTime = LocalDateTime.of(2008, 3, 30, 1, 0, 0, 0); in test_London_getOffsetInfo_gap()
266 assertEquals(trans.getDateTimeBefore(), LocalDateTime.of(2008, 3, 30, 1, 0)); in test_London_getOffsetInfo_gap()
267 assertEquals(trans.getDateTimeAfter(), LocalDateTime.of(2008, 3, 30, 2, 0)); in test_London_getOffsetInfo_gap()
[all …]
/libcore/ojluni/src/main/java/java/time/
DLocalDateTime.java129 public final class LocalDateTime class
138 public static final LocalDateTime MIN = LocalDateTime.of(LocalDate.MIN, LocalTime.MIN);
145 public static final LocalDateTime MAX = LocalDateTime.of(LocalDate.MAX, LocalTime.MAX);
174 public static LocalDateTime now() { in now()
190 public static LocalDateTime now(ZoneId zone) { in now()
204 public static LocalDateTime now(Clock clock) { in now()
230 public static LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute) { in of()
233 return new LocalDateTime(date, time); in of()
255 …public static LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute, int se… in of()
258 return new LocalDateTime(date, time); in of()
[all …]
DZonedDateTime.java170 private final LocalDateTime dateTime;
260 return of(LocalDateTime.of(date, time), zone); in of()
287 public static ZonedDateTime of(LocalDateTime localDateTime, ZoneId zone) { in of()
334LocalDateTime dt = LocalDateTime.of(year, month, dayOfMonth, hour, minute, second, nanoOfSecond); in of()
361 …public static ZonedDateTime ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferred… in ofLocal()
427 …public static ZonedDateTime ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)… in ofInstant()
451 LocalDateTime ldt = LocalDateTime.ofEpochSecond(epochSecond, nanoOfSecond, offset); in create()
470 …public static ZonedDateTime ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) { in ofStrict()
511 …private static ZonedDateTime ofLenient(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone… in ofLenient()
604 private ZonedDateTime(LocalDateTime dateTime, ZoneOffset offset, ZoneId zone) { in ZonedDateTime()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneOffsetTransition.java66 import java.time.LocalDateTime;
96 ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), null, OFFSET_0200); in test_factory_nullOffsetBefore()
101 ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, null); in test_factory_nullOffsetAfter()
106 ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, OFFSET_0200); in test_factory_sameOffset()
111 … ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30, 0, 500), OFFSET_0200, OFFSET_0300); in test_factory_noNanos()
119 LocalDateTime before = LocalDateTime.of(2010, 3, 31, 1, 0); in test_getters_gap()
120 LocalDateTime after = LocalDateTime.of(2010, 3, 31, 2, 0); in test_getters_gap()
134 LocalDateTime before = LocalDateTime.of(2010, 10, 31, 1, 0); in test_getters_overlap()
135 LocalDateTime after = LocalDateTime.of(2010, 10, 31, 0, 0); in test_getters_overlap()
153 LocalDateTime ldt = LocalDateTime.of(2010, 3, 31, 1, 0); in test_isValidOffset_gap()
[all …]
DTCKZoneRules.java75 import java.time.LocalDateTime;
212 checkOffset(test, LocalDateTime.of(2008, 3, 30, 0, 59, 59, 999999999), OFFSET_ZERO, 1); in test_London_getOffsetInfo_toDST()
213 checkOffset(test, LocalDateTime.of(2008, 3, 30, 2, 0, 0, 0), OFFSET_PONE, 1); in test_London_getOffsetInfo_toDST()
228 checkOffset(test, LocalDateTime.of(2008, 10, 26, 0, 59, 59, 999999999), OFFSET_PONE, 1); in test_London_getOffsetInfo_fromDST()
229 checkOffset(test, LocalDateTime.of(2008, 10, 26, 2, 0, 0, 0), OFFSET_ZERO, 1); in test_London_getOffsetInfo_fromDST()
235 final LocalDateTime dateTime = LocalDateTime.of(2008, 3, 30, 1, 0, 0, 0); in test_London_getOffsetInfo_gap()
242 assertEquals(trans.getDateTimeBefore(), LocalDateTime.of(2008, 3, 30, 1, 0)); in test_London_getOffsetInfo_gap()
243 assertEquals(trans.getDateTimeAfter(), LocalDateTime.of(2008, 3, 30, 2, 0)); in test_London_getOffsetInfo_gap()
261 final LocalDateTime dateTime = LocalDateTime.of(2008, 10, 26, 1, 0, 0, 0); in test_London_getOffsetInfo_overlap()
268 assertEquals(trans.getDateTimeBefore(), LocalDateTime.of(2008, 10, 26, 2, 0)); in test_London_getOffsetInfo_overlap()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKZoneOffsetTransitionSerialization.java68 import java.time.LocalDateTime;
85 LocalDateTime ldt = LocalDateTime.of(Year.MAX_VALUE, 12, 31, 1, 31, 53); in test_serialization_unusual1()
92 LocalDateTime ldt = LocalDateTime.of(Year.MIN_VALUE, 1, 1, 12, 1, 3); in test_serialization_unusual2()
99 LocalDateTime before = LocalDateTime.of(2010, 3, 31, 1, 0); in test_serialization_gap()
100 LocalDateTime after = LocalDateTime.of(2010, 3, 31, 2, 0); in test_serialization_gap()
107 LocalDateTime before = LocalDateTime.of(2010, 10, 31, 1, 0); in test_serialization_overlap()
108 LocalDateTime after = LocalDateTime.of(2010, 10, 31, 0, 0); in test_serialization_overlap()
/libcore/ojluni/src/test/java/util/zip/
DTestLocalTime.java42 LocalDateTime ldt = LocalDateTime.now(); in main()
60 test(LocalDateTime.of(2100, 12, 06, 12, 34, 34, 973)); in main()
61 test(LocalDateTime.of(2106, 12, 06, 12, 34, 34, 973)); in main()
64 test(LocalDateTime.of(2016, 03, 13, 2, 50, 00)); // gap in main()
65 test(LocalDateTime.of(2015, 11, 1, 1, 30, 00)); // overlap in main()
66 test(LocalDateTime.of(1968, 04, 28, 2, 51, 25)); in main()
67 test(LocalDateTime.of(1970, 04, 26, 2, 31, 52)); in main()
70 test(LocalDateTime.of(2200, 04, 26, 2, 31, 52)); // unix 2038 in main()
77 static byte[] getBytes(LocalDateTime mtime) throws Throwable { in getBytes()
89 static void testWithTZ(TimeZone tz, LocalDateTime ldt) throws Throwable { in testWithTZ()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKLocalDateTimeSerialization.java67 import java.time.LocalDateTime;
75 …private LocalDateTime TEST_2007_07_15_12_30_40_987654321 = LocalDateTime.of(2007, 7, 15, 12, 30, 4…
81 assertSerializable(LocalDateTime.MIN); in test_serialization()
82 assertSerializable(LocalDateTime.MAX); in test_serialization()
99 assertSerializedBySer(LocalDateTime.of(2012, 9, 16, 22, 17, 59, 459_000_000), bytes); in test_serialization_format()
104 assertNotSerializable(LocalDateTime.class); in test_invalid_serialform()
DTCKZonedDateTimeSerialization.java69 import java.time.LocalDateTime;
83 private LocalDateTime TEST_LOCAL_2008_06_30_11_30_59_500;
89 TEST_LOCAL_2008_06_30_11_30_59_500 = LocalDateTime.of(2008, 6, 30, 11, 30, 59, 500); 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()
/libcore/luni/src/test/java/libcore/java/time/
DZonedDateTimeTest.java20 import java.time.LocalDateTime;
48 private static final LocalDateTime LDT_P1 = LocalDateTime.of(2000, Month.JANUARY, 1, 0, 0);
51 private static final LocalDateTime LDT_P2 = LocalDateTime.of(2000, Month.JUNE, 1, 0, 0);
55 private static final LocalDateTime LDT_IN_GAP = LocalDateTime.of(2000, Month.MARCH, 26, 2, 30);
59 private static final LocalDateTime LDT_IN_OVERLAP =
60 LocalDateTime.of(2000, Month.OCTOBER, 29, 2, 30);
98 private static void checkOfInstant(LocalDateTime localDateTime, ZoneOffset offset, in checkOfInstant()
99 ZoneId zone, LocalDateTime expectedDateTime, ZoneOffset expectedOffset) { in checkOfInstant()
168 private static void checkOfLocal(LocalDateTime localDateTime, ZoneId zone, in checkOfLocal()
169 ZoneOffset preferredOffset, LocalDateTime expectedDateTime, ZoneOffset expectedOffset) { in checkOfLocal()
DTimeApisConsistencyTest.java32 import java.time.LocalDateTime;
59 private static final LocalDateTime START_DATE;
62 private static final LocalDateTime END_DATE;
69 START_DATE = LocalDateTime.of(1800, 1, 1, 0, 0);
73 END_DATE = LocalDateTime.of(2100, 1, 1, 0, 0);
76 START_DATE = LocalDateTime.of(1902, 1, 1, 0, 0);
78 END_DATE = LocalDateTime.of(2038, 1, 1, 0, 0);
DDurationTest.java23 import java.time.LocalDateTime;
82 { LocalDateTime.MAX, Duration.ofNanos(1) }, in test_addTo_exceeds()
83 { LocalDateTime.now(), MAX_DURATION }, in test_addTo_exceeds()
84 { ZonedDateTime.of(LocalDateTime.MAX, ZoneOffset.UTC ), Duration.ofNanos(1) }, in test_addTo_exceeds()
109 { LocalDateTime.MIN, Duration.ofNanos(1) }, in test_subtractFrom_exceeds()
110 { LocalDateTime.now(), MAX_DURATION }, in test_subtractFrom_exceeds()
111 { LocalDateTime.MAX, MAX_DURATION }, in test_subtractFrom_exceeds()
112 { ZonedDateTime.of(LocalDateTime.MIN, ZoneOffset.UTC ), Duration.ofNanos(1) }, in test_subtractFrom_exceeds()
/libcore/luni/src/test/java/libcore/java/time/zone/
DZoneRulesTest.java21 import java.time.LocalDateTime;
48 LocalDateTime.MIN.toInstant(offset), in test_of_ZoneOffset()
50 LocalDateTime.of(2000, Month.JANUARY, 1, 1, 1).toInstant(ZoneOffset.UTC), in test_of_ZoneOffset()
52 LocalDateTime.MAX.toInstant(offset), in test_of_ZoneOffset()
59 LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, offset); in test_of_ZoneOffset()
DZoneOffsetTransitionTest.java19 import java.time.LocalDateTime;
36 LocalDateTime time = LocalDateTime.of(2000, Month.JANUARY, 1, 0, 0); in test_toEpochSeconds()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKChronoField.java103 import java.time.LocalDateTime;
202 {YEAR, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 2000}, in data_fieldAndAccessor()
204 {MONTH_OF_YEAR, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 2}, in data_fieldAndAccessor()
206 {DAY_OF_MONTH, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 29}, in data_fieldAndAccessor()
208 {DAY_OF_YEAR, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 60}, in data_fieldAndAccessor()
211 {HOUR_OF_DAY, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 5}, in data_fieldAndAccessor()
214 {MINUTE_OF_DAY, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 5*60 + 4}, in data_fieldAndAccessor()
216 {MINUTE_OF_HOUR, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 4}, in data_fieldAndAccessor()
219 … {SECOND_OF_DAY, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 5*3600 + 4*60 + 3}, in data_fieldAndAccessor()
221 {SECOND_OF_MINUTE, LocalDateTime.of(2000, 2, 29, 5, 4, 3, 200), true, 3}, in data_fieldAndAccessor()
[all …]
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransition.java72 import java.time.LocalDateTime;
113 private final LocalDateTime transition;
138 …public static ZoneOffsetTransition of(LocalDateTime transition, ZoneOffset offsetBefore, ZoneOffse… in of()
158 … ZoneOffsetTransition(LocalDateTime transition, ZoneOffset offsetBefore, ZoneOffset offsetAfter) { in ZoneOffsetTransition()
175 this.transition = LocalDateTime.ofEpochSecond(epochSecond, 0, offsetBefore); in ZoneOffsetTransition()
279 public LocalDateTime getDateTimeBefore() { in getDateTimeBefore()
293 public LocalDateTime getDateTimeAfter() { in getDateTimeAfter()
DZoneRules.java72 import java.time.LocalDateTime;
137 private final LocalDateTime[] savingsLocalTransitions;
163 private static final LocalDateTime[] EMPTY_LDT_ARRAY = new LocalDateTime[0];
239 List<LocalDateTime> localTransitionList = new ArrayList<>(); in ZoneRules()
252 …this.savingsLocalTransitions = localTransitionList.toArray(new LocalDateTime[localTransitionList.s… in ZoneRules()
296 List<LocalDateTime> localTransitionList = new ArrayList<>(); in ZoneRules()
309 …this.savingsLocalTransitions = localTransitionList.toArray(new LocalDateTime[localTransitionList.s… in ZoneRules()
561 public ZoneOffset getOffset(LocalDateTime localDateTime) { in getOffset()
611 public List<ZoneOffset> getValidOffsets(LocalDateTime localDateTime) { in getValidOffsets()
654 public ZoneOffsetTransition getTransition(LocalDateTime localDateTime) { in getTransition()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/zone/
DTestZoneRules.java30 import java.time.LocalDateTime;
116 …{TOKYO, LocalDateTime.of(LocalDate.of(1948, 9, 12), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.of… in transitionBeyondDay()
117 …{TOKYO, LocalDateTime.of(LocalDate.of(1949, 9, 11), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.of… in transitionBeyondDay()
118 …{TOKYO, LocalDateTime.of(LocalDate.of(1950, 9, 10), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.of… in transitionBeyondDay()
119 …{TOKYO, LocalDateTime.of(LocalDate.of(1951, 9, 9), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.ofH… in transitionBeyondDay()
164 …public void test_TransitionBeyondDay(ZoneId zid, LocalDateTime ldt, ZoneOffset before, ZoneOffset … in test_TransitionBeyondDay()
177 Instant maxLocalDateTime = LocalDateTime.of(Year.MAX_VALUE, in test_TransitionLastRuleYear()
185 …ZoneOffsetTransition transition = ZoneOffsetTransition.of(LocalDateTime.ofEpochSecond(0, 0, OFF_0), in test_TransitionLastRuleYear()
213 LocalDateTime transitionDay = LocalDateTime.of(2020, 1, 1, 2, 0); in test_EmptyTransitionList()

1234