Home
last modified time | relevance | path

Searched refs:ofHours (Results 1 – 25 of 57) sorted by relevance

123

/libcore/ojluni/src/test/java/time/test/java/time/
DTestZoneId.java165 …quals(test.getRules().getOffset(createInstant(2008, 1, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(0)); in test_London_getOffset()
166 …quals(test.getRules().getOffset(createInstant(2008, 2, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(0)); in test_London_getOffset()
167 …quals(test.getRules().getOffset(createInstant(2008, 3, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(0)); in test_London_getOffset()
168 …quals(test.getRules().getOffset(createInstant(2008, 4, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(1)); in test_London_getOffset()
169 …quals(test.getRules().getOffset(createInstant(2008, 5, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(1)); in test_London_getOffset()
170 …quals(test.getRules().getOffset(createInstant(2008, 6, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(1)); in test_London_getOffset()
171 …quals(test.getRules().getOffset(createInstant(2008, 7, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(1)); in test_London_getOffset()
172 …quals(test.getRules().getOffset(createInstant(2008, 8, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(1)); in test_London_getOffset()
173 …quals(test.getRules().getOffset(createInstant(2008, 9, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(1)); in test_London_getOffset()
174 …uals(test.getRules().getOffset(createInstant(2008, 10, 1, ZoneOffset.UTC)), ZoneOffset.ofHours(1)); in test_London_getOffset()
[all …]
DTestOffsetDateTime.java84 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
85 private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
330 .withOffsetSameLocal(ZoneOffset.ofHours(-17)); in test_duration()
332 assertEquals(Duration.between(start, end), Duration.ofHours(1)); in test_duration()
DTestZonedDateTime.java92 assertEquals(Duration.between(start, end), Duration.ofHours(17)); in test_duration()
DTestClock_Fixed.java80 …INSTANT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2)).toInstant();
DTestClock_Tick.java82 …l ZonedDateTime ZDT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2));
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRules.java99 private static final ZoneOffset OFFSET_ZERO = ZoneOffset.ofHours(0);
100 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
101 private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
270 assertEquals(trans.isValidOffset(ZoneOffset.ofHours(-1)), false); in test_London_getOffsetInfo_overlap()
669 assertEquals(trans.isValidOffset(ZoneOffset.ofHours(3)), false); in test_Paris_getOffsetInfo_overlap()
731 ZoneOffset offset = ZoneOffset.ofHours(-5); in test_NewYork_getOffset()
732 assertEquals(test.getOffset(createInstant(2008, 1, 1, offset)), ZoneOffset.ofHours(-5)); in test_NewYork_getOffset()
733 assertEquals(test.getOffset(createInstant(2008, 2, 1, offset)), ZoneOffset.ofHours(-5)); in test_NewYork_getOffset()
734 assertEquals(test.getOffset(createInstant(2008, 3, 1, offset)), ZoneOffset.ofHours(-5)); in test_NewYork_getOffset()
735 assertEquals(test.getOffset(createInstant(2008, 4, 1, offset)), ZoneOffset.ofHours(-4)); in test_NewYork_getOffset()
[all …]
DTCKZoneOffsetTransition.java80 private static final ZoneOffset OFFSET_0100 = ZoneOffset.ofHours(1);
81 private static final ZoneOffset OFFSET_0200 = ZoneOffset.ofHours(2);
83 private static final ZoneOffset OFFSET_0300 = ZoneOffset.ofHours(3);
84 private static final ZoneOffset OFFSET_0400 = ZoneOffset.ofHours(4);
DTCKFixedZoneRules.java88 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
89 private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
90 private static final ZoneOffset OFFSET_M18 = ZoneOffset.ofHours(-18);
/libcore/ojluni/src/test/java/time/test/java/time/zone/
DTestZoneRules.java64 private static final ZoneOffset OFF_0 = ZoneOffset.ofHours(0);
65 private static final ZoneOffset OFF_1 = ZoneOffset.ofHours(1);
66 private static final ZoneOffset OFF_2 = ZoneOffset.ofHours(2);
116 …ocalDateTime.of(LocalDate.of(1948, 9, 12), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.ofHours(9)}, in transitionBeyondDay()
117 …ocalDateTime.of(LocalDate.of(1949, 9, 11), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.ofHours(9)}, in transitionBeyondDay()
118 …ocalDateTime.of(LocalDate.of(1950, 9, 10), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.ofHours(9)}, in transitionBeyondDay()
119 …LocalDateTime.of(LocalDate.of(1951, 9, 9), ONE_AM), ZoneOffset.ofHours(10), ZoneOffset.ofHours(9)}, in transitionBeyondDay()
223 assertEquals(rules.getOffset(testDay), ZoneOffset.ofHours(offset)); in test_EmptyTransitionList()
224 assertEquals(rules.getStandardOffset(testDay), ZoneOffset.ofHours(stdOffset)); in test_EmptyTransitionList()
225 assertEquals(rules.getDaylightSavings(testDay), Duration.ofHours(savings)); in test_EmptyTransitionList()
DTestFixedZoneRules.java79 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestChronoUnit.java133 …tEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHou… in test_yearsBetween_ZonedDateSameOffset()
140 …tEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHou… in test_yearsBetween_ZonedDateLaterOffset()
142 …tEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHou… in test_yearsBetween_ZonedDateLaterOffset()
206 …Equals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHou… in test_monthsBetween_ZonedDateSameOffset()
213 …Equals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHou… in test_monthsBetween_ZonedDateLaterOffset()
215 …Equals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHou… in test_monthsBetween_ZonedDateLaterOffset()
316 …rtEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHou… in test_daysBetween_ZonedDateSameOffset()
323 …rtEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHou… in test_daysBetween_ZonedDateLaterOffset()
325 …rtEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHou… in test_daysBetween_ZonedDateLaterOffset()
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKDurationSerialization.java88 assertSerializable(Duration.ofHours(5)); in test_serialization()
89 assertSerializable(Duration.ofHours(0)); in test_serialization()
90 assertSerializable(Duration.ofHours(-5)); in test_serialization()
DTCKOffsetTimeSerialization.java77 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
107 assertSerializedBySer(OffsetTime.of(22, 17, 59, 464_000_000, ZoneOffset.ofHours(1)), bytes); in test_serialization_format()
DTCKOffsetDateTimeSerialization.java79 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
111 assertSerializedBySer(OffsetDateTime.of(ldt, ZoneOffset.ofHours(1)), bytes); in test_serialization_format()
DTCKZonedDateTimeSerialization.java80 private static final ZoneOffset OFFSET_0100 = ZoneOffset.ofHours(1);
138 …ateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneOffset.ofHours(1)); in test_serialization_format_zoneOffset()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKFixedZoneRulesSerialization.java80 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
81 private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2);
82 private static final ZoneOffset OFFSET_M18 = ZoneOffset.ofHours(-18);
DTCKZoneOffsetTransitionRuleSerialization.java79 private static final ZoneOffset OFFSET_0200 = ZoneOffset.ofHours(2);
80 private static final ZoneOffset OFFSET_0300 = ZoneOffset.ofHours(3);
92 ZoneOffset.ofHours(-18)); in test_serialization_unusualOffsets()
DTCKZoneOffsetTransitionSerialization.java79 private static final ZoneOffset OFFSET_0200 = ZoneOffset.ofHours(2);
80 private static final ZoneOffset OFFSET_0300 = ZoneOffset.ofHours(3);
/libcore/luni/src/test/java/libcore/java/time/
DZonedDateTimeTest.java42 private static final ZoneOffset OFFSET_P1 = ZoneOffset.ofHours(1);
45 private static final ZoneOffset OFFSET_P2 = ZoneOffset.ofHours(2);
80 checkOfInstant(LDT_P1, ZoneOffset.ofHours(-10), ZONE_VIENNA, LDT_P1.withHour(11), in test_ofInstant()
145 checkOfLocal(LDT_P1, ZONE_VIENNA, ZoneOffset.ofHours(-10), LDT_P1, OFFSET_P1); in test_ofLocal()
159 checkOfLocal(LDT_IN_OVERLAP, ZONE_VIENNA, ZoneOffset.ofHours(10), in test_ofLocal()
DTimeApisConsistencyTest.java91 Duration.ofHours(1), Duration.ofHours(-1),
92 Duration.ofHours(2), Duration.ofHours(-2),
DZoneOffsetTest.java34 private static final ZoneOffset OFFSET_P1 = ZoneOffset.ofHours(1);
/libcore/luni/src/test/java/libcore/java/time/zone/
DZoneOffsetTransitionTest.java37 ZoneOffset offsetP1 = ZoneOffset.ofHours(1); in test_toEpochSeconds()
38 ZoneOffset offsetP2 = ZoneOffset.ofHours(2); in test_toEpochSeconds()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKZoneOffset.java102 …TemporalAccessor[] array = {ZoneOffset.ofHours(1), ZoneOffset.ofHoursMinutesSeconds(-5, -6, -30) }; in samples()
300 ZoneOffset test = ZoneOffset.ofHours(i); in test_factory_int_hours()
307 ZoneOffset.ofHours(19); in test_factory_int_hours_tooBig()
312 ZoneOffset.ofHours(-19); in test_factory_int_hours_tooSmall()
441 assertEquals(ZoneOffset.ofTotalSeconds(18 * 60 * 60), ZoneOffset.ofHours(18)); in test_factory_ofTotalSeconds()
442 assertEquals(ZoneOffset.ofTotalSeconds(-18 * 60 * 60), ZoneOffset.ofHours(-18)); in test_factory_ofTotalSeconds()
466 LocalTime.of(17, 30)), ZoneOffset.ofHours(2))), ZoneOffset.ofHours(2)); in test_factory_CalendricalObject()
530 assertEquals(ZoneOffset.ofHours(-2).get(OFFSET_SECONDS), -7200); in test_get_TemporalField()
537 assertEquals(ZoneOffset.ofHours(-2).getLong(OFFSET_SECONDS), -7200); in test_getLong_TemporalField()
627 …get = OffsetDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10, 10, 10), ZoneOffset.ofHours(i));
[all …]
DTCKDuration.java270 Duration test = Duration.ofHours(2); in factory_hours()
277 Duration test = Duration.ofHours(Long.MAX_VALUE / 3600); in factory_hours_max()
284 Duration test = Duration.ofHours(Long.MIN_VALUE / 3600); in factory_hours_min()
291 Duration.ofHours(Long.MAX_VALUE / 3600 + 1); in factory_hours_tooBig()
296 Duration.ofHours(Long.MIN_VALUE / 3600 - 1); in factory_hours_tooSmall()
435 TemporalAmount amount = Duration.ofHours(3); in factory_from_TemporalAmount_Duration()
436 assertEquals(Duration.from(amount), Duration.ofHours(3)); in factory_from_TemporalAmount_Duration()
1240 Duration t = Duration.ofHours(hours); in plusHours_long()
1247 Duration t = Duration.ofHours(1); in plusHours_long_overflowTooBig()
1253 Duration t = Duration.ofHours(-1); in plusHours_long_overflowTooSmall()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestZoneOffsetPrinter.java83 {"+HH", "+01", ZoneOffset.ofHours(1)}, in provider_offsets()
84 {"+HH", "-01", ZoneOffset.ofHours(-1)}, in provider_offsets()

123