Home
last modified time | relevance | path

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

123

/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestZoneOffsetParser.java102 assertParsed(parsed, ZoneOffset.UTC); in test_parse_exactMatch_UTC()
109 assertParsed(parsed, ZoneOffset.UTC); in test_parse_startStringMatch_UTC()
116 assertParsed(parsed, ZoneOffset.UTC); in test_parse_midStringMatch_UTC()
123 assertParsed(parsed, ZoneOffset.UTC); in test_parse_endStringMatch_UTC()
131 assertParsed(parsed, ZoneOffset.UTC); in test_parse_exactMatch_UTC_EmptyUTC()
138 assertParsed(parsed, ZoneOffset.UTC); in test_parse_startStringMatch_UTC_EmptyUTC()
145 assertParsed(parsed, ZoneOffset.UTC); in test_parse_midStringMatch_UTC_EmptyUTC()
152 assertParsed(parsed, ZoneOffset.UTC); in test_parse_endStringMatch_UTC_EmptyUTC()
159 {"+HH", "+00", ZoneOffset.UTC}, in provider_offsets()
160 {"+HH", "-00", ZoneOffset.UTC}, in provider_offsets()
[all …]
DTestZoneOffsetPrinter.java82 {"+HH", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
86 {"+HHMM", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
90 {"+HH:MM", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
94 {"+HHMMss", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
105 {"+HHMMss", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
115 {"+HH:MM:ss", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
126 {"+HH:MM:ss", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
136 {"+HHMMSS", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
142 {"+HH:MM:SS", "NO-OFFSET", ZoneOffset.UTC}, in provider_offsets()
DTestDateTimeParsing.java126 …014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstan… in data_instantZones()
127 …014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstan… in data_instantZones()
128 …30T01:02:03Z +02:30", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstan… in data_instantZones()
129 …6-30T01:02:03Z 9000", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).withZoneSameInstan… in data_instantZones()
169 …NT, "2014-06-30T01:02:03Z", ZonedDateTime.of(2014, 6, 30, 1, 2, 3, 0, ZoneOffset.UTC).toInstant()}, in data_instantNoZone()
/libcore/luni/src/test/java/libcore/java/time/
DOffsetDateTimeTest.java35 OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 6, ZoneOffset.UTC);
43 assertEquals(OffsetDateTime.of(2000, 1, 2, 4, 4, 5, 6, ZoneOffset.UTC), in test_plus()
45 assertEquals(OffsetDateTime.of(2000, 1, 3, 2, 4, 5, 6, ZoneOffset.UTC), in test_plus()
47 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 5, 5, 6, ZoneOffset.UTC), in test_plus()
49 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 5, 5, 6, ZoneOffset.UTC), in test_plus()
51 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 1_000_006, ZoneOffset.UTC), in test_plus()
53 assertEquals(OffsetDateTime.of(2000, 1, 2, 3, 4, 5, 7, ZoneOffset.UTC), in test_plus()
DOffsetTimeTest.java39 .of(/* hour */ 12, /* minute */ 0, /* second */ 0, /* nano */ 0, ZoneOffset.UTC);
45 assertEquals(OffsetTime.of(13, 0, 0, 0, ZoneOffset.UTC), in test_plus()
47 assertEquals(OffsetTime.of(11, 0, 0, 0, ZoneOffset.UTC), in test_plus()
49 assertEquals(OffsetTime.of(12, 1, 0, 0, ZoneOffset.UTC), in test_plus()
51 assertEquals(OffsetTime.of(12, 1, 0, 0, ZoneOffset.UTC), in test_plus()
53 assertEquals(OffsetTime.of(12, 0, 0, 1_000_000, ZoneOffset.UTC), in test_plus()
55 assertEquals(OffsetTime.of(12, 0, 0, 1, ZoneOffset.UTC), in test_plus()
DDurationTest.java84 { 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/test/java/time/
DTestZoneId.java116 ZoneId test = ZoneOffset.UTC; in test_constant_UTC()
120 assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), ZoneOffset.UTC); in test_constant_UTC()
121 checkOffset(test.getRules(), createLDT(2008, 6, 30), ZoneOffset.UTC, 1); in test_constant_UTC()
165 …assertEquals(test.getRules().getOffset(createInstant(2008, 1, 1, ZoneOffset.UTC)), ZoneOffset.ofHo… in test_London_getOffset()
166 …assertEquals(test.getRules().getOffset(createInstant(2008, 2, 1, ZoneOffset.UTC)), ZoneOffset.ofHo… in test_London_getOffset()
167 …assertEquals(test.getRules().getOffset(createInstant(2008, 3, 1, ZoneOffset.UTC)), ZoneOffset.ofHo… in test_London_getOffset()
168 …assertEquals(test.getRules().getOffset(createInstant(2008, 4, 1, ZoneOffset.UTC)), ZoneOffset.ofHo… in test_London_getOffset()
169 …assertEquals(test.getRules().getOffset(createInstant(2008, 5, 1, ZoneOffset.UTC)), ZoneOffset.ofHo… in test_London_getOffset()
170 …assertEquals(test.getRules().getOffset(createInstant(2008, 6, 1, ZoneOffset.UTC)), ZoneOffset.ofHo… in test_London_getOffset()
171 …assertEquals(test.getRules().getOffset(createInstant(2008, 7, 1, ZoneOffset.UTC)), ZoneOffset.ofHo… in test_London_getOffset()
[all …]
DTestOffsetDateTime_instants.java112 …e expected = OffsetDateTime.of(LocalDate.of(1970, 1, 1), LocalTime.of(0, 0, 0, 0), ZoneOffset.UTC); in factory_ofInstant_allDaysInCycle()
115 OffsetDateTime test = OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in factory_ofInstant_allDaysInCycle()
136 OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in factory_ofInstant_tooLow()
149 OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in factory_ofInstant_tooBig()
239 …d = OffsetDateTime.of(LocalDate.of((int) minYear, 1, 1), LocalTime.of(0, 0, 0, 0), ZoneOffset.UTC); in doTest_factory_ofInstant_all()
243 OffsetDateTime test = OffsetDateTime.ofInstant(instant, ZoneOffset.UTC); in doTest_factory_ofInstant_all()
286 …ateTime dt = OffsetDateTime.of(LocalDate.of(1970, 1, 1), LocalTime.of(0, 0, 0, 0), ZoneOffset.UTC); in test_toInstant_19700101()
293 …ateTime dt = OffsetDateTime.of(LocalDate.of(1970, 1, 1), LocalTime.of(0, 0, 0, 1), ZoneOffset.UTC); in test_toInstant_19700101_oneNano()
300 …OffsetDateTime.of(LocalDate.of(1969, 12, 31), LocalTime.of(23, 59, 59, 999999999), ZoneOffset.UTC); in test_toInstant_19700101_minusOneNano()
307 …ateTime dt = OffsetDateTime.of(LocalDate.of(1970, 1, 2), LocalTime.of(0, 0, 0, 0), ZoneOffset.UTC); in test_toInstant_19700102()
[all …]
DTestZoneOffset.java81 assertSame(ZoneOffset.ofTotalSeconds(0), ZoneOffset.UTC); in test_factory_ofTotalSecondsSame()
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKZoneRules.java122 ZonedDateTime old = createZDT(1800, 1, 1, ZoneOffset.UTC); in test_London_preTimeZones()
134 assertEquals(test.getOffset(createInstant(2008, 1, 1, ZoneOffset.UTC)), OFFSET_ZERO); in test_London_getOffset()
135 assertEquals(test.getOffset(createInstant(2008, 2, 1, ZoneOffset.UTC)), OFFSET_ZERO); in test_London_getOffset()
136 assertEquals(test.getOffset(createInstant(2008, 3, 1, ZoneOffset.UTC)), OFFSET_ZERO); in test_London_getOffset()
137 assertEquals(test.getOffset(createInstant(2008, 4, 1, ZoneOffset.UTC)), OFFSET_PONE); in test_London_getOffset()
138 assertEquals(test.getOffset(createInstant(2008, 5, 1, ZoneOffset.UTC)), OFFSET_PONE); in test_London_getOffset()
139 assertEquals(test.getOffset(createInstant(2008, 6, 1, ZoneOffset.UTC)), OFFSET_PONE); in test_London_getOffset()
140 assertEquals(test.getOffset(createInstant(2008, 7, 1, ZoneOffset.UTC)), OFFSET_PONE); in test_London_getOffset()
141 assertEquals(test.getOffset(createInstant(2008, 8, 1, ZoneOffset.UTC)), OFFSET_PONE); in test_London_getOffset()
142 assertEquals(test.getOffset(createInstant(2008, 9, 1, ZoneOffset.UTC)), OFFSET_PONE); in test_London_getOffset()
[all …]
/libcore/luni/src/test/java/libcore/java/time/zone/
DIcuZoneRulesProviderTest.java70 LocalDateTime.of(1900, Month.DECEMBER, 24, 12, 0).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
71 LocalDateTime.of(1970, Month.JANUARY, 1, 2, 3).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
72 LocalDateTime.of(1980, Month.FEBRUARY, 4, 5, 6).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
73 LocalDateTime.of(1990, Month.MARCH, 7, 8, 9).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
74 LocalDateTime.of(2000, Month.APRIL, 10, 11, 12).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
75 LocalDateTime.of(2016, Month.MAY, 13, 14, 15).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
76 LocalDateTime.of(2020, Month.JUNE, 16, 17, 18).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
77 LocalDateTime.of(2100, Month.JULY, 19, 20, 21).toInstant(ZoneOffset.UTC), in testTransitionsNearInstants()
124 .toInstant(ZoneOffset.UTC); in testAllTransitions()
128 .toInstant(ZoneOffset.UTC); in testAllTransitions()
DZoneRulesTest.java50 LocalDateTime.of(2000, Month.JANUARY, 1, 1, 1).toInstant(ZoneOffset.UTC), in test_of_ZoneOffset()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKClock_System.java84 assertEquals(system.getZone(), ZoneOffset.UTC); in test_instant()
98 assertEquals(system.getZone(), ZoneOffset.UTC); in test_millis()
113 assertEquals(test.getZone(), ZoneOffset.UTC); in test_systemUTC()
114 assertEquals(test, Clock.system(ZoneOffset.UTC)); in test_systemUTC()
179 assertEquals(a.equals(Clock.fixed(Instant.now(), ZoneOffset.UTC)), false); in test_equals()
183 Clock a = Clock.system(ZoneOffset.UTC); in test_hashCode()
184 Clock b = Clock.system(ZoneOffset.UTC); in test_hashCode()
DTCKClock_Fixed.java122 Clock a = Clock.fixed(INSTANT, ZoneOffset.UTC); in test_equals()
123 Clock b = Clock.fixed(INSTANT, ZoneOffset.UTC); in test_equals()
132 Clock d = Clock.fixed(INSTANT.minusNanos(1), ZoneOffset.UTC); in test_equals()
141 Clock a = Clock.fixed(INSTANT, ZoneOffset.UTC); in test_hashCode()
142 Clock b = Clock.fixed(INSTANT, ZoneOffset.UTC); in test_hashCode()
149 Clock d = Clock.fixed(INSTANT.minusNanos(1), ZoneOffset.UTC); in test_hashCode()
DTCKZoneOffset.java129 ZoneOffset test = ZoneOffset.UTC; in test_constant_UTC()
157 assertSame(test, ZoneOffset.UTC); in test_factory_string_UTC()
477 offset = ZoneOffset.UTC; in test_getId()
495 assertEquals(offset.getRules().isValidOffset((LocalDateTime) null, ZoneOffset.UTC), false); in test_getRules()
509 assertEquals(ZoneOffset.UTC.get(OFFSET_SECONDS), 0); in test_get_TemporalField()
516 assertEquals(ZoneOffset.UTC.getLong(OFFSET_SECONDS), 0); in test_getLong_TemporalField()
527 {ZoneOffset.UTC, TemporalQueries.chronology(), null}, in data_query()
528 {ZoneOffset.UTC, TemporalQueries.zoneId(), null}, in data_query()
529 {ZoneOffset.UTC, TemporalQueries.precision(), null}, in data_query()
530 {ZoneOffset.UTC, TemporalQueries.zone(), ZoneOffset.UTC}, in data_query()
[all …]
DTCKInstant.java209 Clock clock = Clock.fixed(expected, ZoneOffset.UTC);
219 Clock clock = Clock.fixed(expected, ZoneOffset.UTC);
445 …cond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC), Instant.ofEpochSe…
446 …ime.of(1970, 1, 1, 0, 0, 20, 10, ZoneOffset.UTC), OffsetDateTime.of(1970, 1, 1, 0, 0, 10, 200, Zon…
483 …cond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC), Instant.ofEpochSe…
2093 {LocalDateTime.of(0, 1, 2, 0, 0).toInstant(ZoneOffset.UTC), "0000-01-02T00:00:00Z"},
2094 … {LocalDateTime.of(0, 1, 1, 12, 30).toInstant(ZoneOffset.UTC), "0000-01-01T12:30:00Z"},
2095 …{LocalDateTime.of(0, 1, 1, 0, 0, 0, 1).toInstant(ZoneOffset.UTC), "0000-01-01T00:00:00.000000001Z"…
2096 {LocalDateTime.of(0, 1, 1, 0, 0).toInstant(ZoneOffset.UTC), "0000-01-01T00:00:00Z"},
2098 …{LocalDateTime.of(-1, 12, 31, 23, 59, 59, 999_999_999).toInstant(ZoneOffset.UTC), "-0001-12-31T23:…
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoZonedDateTime.java118 … ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badWithAdjusterChrono()
121 …ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badWithAdjusterChrono()
141 … ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badPlusAdjusterChrono()
144 …ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badPlusAdjusterChrono()
165 … ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badMinusAdjusterChrono()
168 …ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badMinusAdjusterChrono()
189 … ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badPlusTemporalUnitChrono()
192 …ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badPlusTemporalUnitChrono()
213 … ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badMinusTemporalUnitChrono()
216 …ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); in test_badMinusTemporalUnitChrono()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DSimpleDateFormatTest.java40 private static final TimeZone UTC = TimeZone.getTimeZone("Etc/UTC"); field in SimpleDateFormatTest
82 sdf.setTimeZone(UTC); in test2DigitYearStartIsCloned()
212 format.setTimeZone(UTC); in test2038()
227 return formatDate(l, fmt, UTC); in formatDateUtc()
238 sdf.setTimeZone(UTC); in assertCannotParse()
250 return parseDate(l, fmt, value, UTC); in parseDateUtc()
325 sdf.setTimeZone(UTC); in testTimeZoneFormatting()
341 sdf.setTimeZone(UTC); in testTimeZoneFormatting()
345 sdf.setTimeZone(UTC); in testTimeZoneFormatting()
347 assertEquals(UTC, sdf.getTimeZone()); in testTimeZoneFormatting()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKZoneIdPrinterParser.java88 private static final ZoneOffset OFFSET_UTC = ZoneOffset.UTC;
160 {"+00:00", 6, -1, ZoneOffset.UTC}, in data_parseSuccess()
164 {"-00:00", 6, -1, ZoneOffset.UTC}, in data_parseSuccess()
182 {"Z0", 1, -1, ZoneOffset.UTC}, in data_parseSuccess()
DTCKInstantPrinterParser.java253 Instant expected = OffsetDateTime.of(1970, 2, 4, 0, 0, 0, 0, ZoneOffset.UTC).toInstant(); in test_parse_endOfDay()
265 …Instant expected = OffsetDateTime.of(1970, 2, 3, 23, 59, 59, 123456789, ZoneOffset.UTC).toInstant(… in test_parse_leapSecond()
/libcore/luni/src/test/java/libcore/java/util/
DSimpleTimeZoneTest.java41 private static final TimeZone UTC = TimeZone.getTimeZone("UTC"); field in SimpleTimeZoneTest
270 String actualUtcEntryTime = formatTime(UTC, simpleTransitions[0]); in checkDstTransitionTimes()
272 String actualUtcExitTime = formatTime(UTC, simpleTransitions[1]); in checkDstTransitionTimes()
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestJapaneseChronoImpl.java108 OffsetDateTime jodt = OffsetDateTime.of(isoStartDate, LocalTime.MIN, ZoneOffset.UTC); in test_JapaneseChrono_vsCalendar()
135 … OffsetDateTime jodt = OffsetDateTime.of(LocalDate.from(jd), LocalTime.MIN, ZoneOffset.UTC); in test_dayOfYearVsCalendar()
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransitionRule.java588 UTC, enumConstant
613 case UTC: { in createDateTime()
614 … int difference = wallOffset.getTotalSeconds() - ZoneOffset.UTC.getTotalSeconds(); in createDateTime()
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKClockSerialization.java110 assertSerializable(Clock.fixed(INSTANT, ZoneOffset.UTC)); in test_fixedClockSerializable()
/libcore/ojluni/src/main/java/java/time/
DZoneId.java420 return ofOffset(prefix, ZoneOffset.UTC); in ofWithPrefix()
427 if (offset == ZoneOffset.UTC) { in ofWithPrefix()

123