Home
last modified time | relevance | path

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

12

/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 …]
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));
DTestOffsetDateTime_instants.java81 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
82 private static final ZoneOffset OFFSET_MAX = ZoneOffset.ofHours(18);
83 private static final ZoneOffset OFFSET_MIN = ZoneOffset.ofHours(-18);
/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);
260 assertEquals(trans.isValidOffset(ZoneOffset.ofHours(-1)), false); in test_London_getOffsetInfo_overlap()
641 assertEquals(trans.isValidOffset(ZoneOffset.ofHours(3)), false); in test_Paris_getOffsetInfo_overlap()
699 ZoneOffset offset = ZoneOffset.ofHours(-5); in test_NewYork_getOffset()
700 assertEquals(test.getOffset(createInstant(2008, 1, 1, offset)), ZoneOffset.ofHours(-5)); in test_NewYork_getOffset()
701 assertEquals(test.getOffset(createInstant(2008, 2, 1, offset)), ZoneOffset.ofHours(-5)); in test_NewYork_getOffset()
702 assertEquals(test.getOffset(createInstant(2008, 3, 1, offset)), ZoneOffset.ofHours(-5)); in test_NewYork_getOffset()
703 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/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()
DTCKClockSerialization.java86 …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/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()
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()
426 assertEquals(ZoneOffset.ofTotalSeconds(18 * 60 * 60), ZoneOffset.ofHours(18)); in test_factory_ofTotalSeconds()
427 assertEquals(ZoneOffset.ofTotalSeconds(-18 * 60 * 60), ZoneOffset.ofHours(-18)); in test_factory_ofTotalSeconds()
446 LocalTime.of(17, 30)), ZoneOffset.ofHours(2))), ZoneOffset.ofHours(2)); in test_factory_CalendricalObject()
510 assertEquals(ZoneOffset.ofHours(-2).get(OFFSET_SECONDS), -7200); in test_get_TemporalField()
517 assertEquals(ZoneOffset.ofHours(-2).getLong(OFFSET_SECONDS), -7200); in test_getLong_TemporalField()
607 …get = OffsetDateTime.of(LocalDate.of(1909, 2, 2), LocalTime.of(10, 10, 10), ZoneOffset.ofHours(i));
[all …]
DTCKDuration.java268 Duration test = Duration.ofHours(2); in factory_hours()
275 Duration test = Duration.ofHours(Long.MAX_VALUE / 3600); in factory_hours_max()
282 Duration test = Duration.ofHours(Long.MIN_VALUE / 3600); in factory_hours_min()
289 Duration.ofHours(Long.MAX_VALUE / 3600 + 1); in factory_hours_tooBig()
294 Duration.ofHours(Long.MIN_VALUE / 3600 - 1); in factory_hours_tooSmall()
433 TemporalAmount amount = Duration.ofHours(3); in factory_from_TemporalAmount_Duration()
434 assertEquals(Duration.from(amount), Duration.ofHours(3)); in factory_from_TemporalAmount_Duration()
1213 Duration t = Duration.ofHours(hours); in plusHours_long()
1220 Duration t = Duration.ofHours(1); in plusHours_long_overflowTooBig()
1226 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()
/libcore/ojluni/src/test/java/time/test/java/time/zone/
DTestFixedZoneRules.java79 private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1);
/libcore/luni/src/test/java/libcore/java/time/format/
DDateTimeFormatterBuilderTest.java89 assertEquals(ZoneOffset.ofHours(1), in test_appendZoneRegionId_parse()
/libcore/luni/src/test/java/libcore/java/time/chrono/
DIsoChronologyTest.java109 assertEquals(ZoneOffset.ofHours(1), result.getOffset()); in test_zonedDateTime()

12