Home
last modified time | relevance | path

Searched refs:zone (Results 1 – 25 of 115) sorted by relevance

12345

/libcore/ojluni/src/main/java/java/time/
DClock.java196 public static Clock system(ZoneId zone) { in system() argument
197 Objects.requireNonNull(zone, "zone"); in system()
198 return new SystemClock(zone); in system()
221 public static Clock tickSeconds(ZoneId zone) { in tickSeconds() argument
222 return new TickClock(system(zone), NANOS_PER_SECOND); in tickSeconds()
244 public static Clock tickMinutes(ZoneId zone) { in tickMinutes() argument
245 return new TickClock(system(zone), NANOS_PER_MINUTE); in tickMinutes()
314 public static Clock fixed(Instant fixedInstant, ZoneId zone) { in fixed() argument
316 Objects.requireNonNull(zone, "zone"); in fixed()
317 return new FixedClock(fixedInstant, zone); in fixed()
[all …]
DZonedDateTime.java89 import java.time.zone.ZoneOffsetTransition;
90 import java.time.zone.ZoneRules;
177 private final ZoneId zone; field in ZonedDateTime
209 public static ZonedDateTime now(ZoneId zone) { in now() argument
210 return now(Clock.system(zone)); in now()
258 public static ZonedDateTime of(LocalDate date, LocalTime time, ZoneId zone) { in of() argument
259 return of(LocalDateTime.of(date, time), zone); in of()
286 public static ZonedDateTime of(LocalDateTime localDateTime, ZoneId zone) { in of() argument
287 return ofLocal(localDateTime, zone, null); in of()
332 int hour, int minute, int second, int nanoOfSecond, ZoneId zone) { in of() argument
[all …]
DZoneRegion.java65 import java.time.zone.ZoneRules;
66 import java.time.zone.ZoneRulesException;
67 import java.time.zone.ZoneRulesProvider;
DOffsetDateTime.java92 import java.time.zone.ZoneRules;
222 public static OffsetDateTime now(ZoneId zone) { in now() argument
223 return now(Clock.system(zone)); in now()
317 public static OffsetDateTime ofInstant(Instant instant, ZoneId zone) { in ofInstant() argument
319 Objects.requireNonNull(zone, "zone"); in ofInstant()
320 ZoneRules rules = zone.getRules(); in ofInstant()
1539 if (query == TemporalQueries.offset() || query == TemporalQueries.zone()) { in query()
1687 public ZonedDateTime atZoneSameInstant(ZoneId zone) { in atZoneSameInstant() argument
1688 return ZonedDateTime.ofInstant(dateTime, offset, zone); in atZoneSameInstant()
1715 public ZonedDateTime atZoneSimilarLocal(ZoneId zone) { in atZoneSimilarLocal() argument
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoZonedDateTimeImpl.java81 import java.time.zone.ZoneOffsetTransition;
82 import java.time.zone.ZoneRules;
123 private final transient ZoneId zone; field in ChronoZonedDateTimeImpl
135 ChronoLocalDateTimeImpl<R> localDateTime, ZoneId zone, ZoneOffset preferredOffset) { in ofBest() argument
137 Objects.requireNonNull(zone, "zone"); in ofBest()
138 if (zone instanceof ZoneOffset) { in ofBest()
139 return new ChronoZonedDateTimeImpl<>(localDateTime, (ZoneOffset) zone, zone); in ofBest()
141 ZoneRules rules = zone.getRules(); in ofBest()
159 return new ChronoZonedDateTimeImpl<>(localDateTime, offset, zone); in ofBest()
170 static ChronoZonedDateTimeImpl<?> ofInstant(Chronology chrono, Instant instant, ZoneId zone) { in ofInstant() argument
[all …]
DChronology.java405 default ChronoLocalDate dateNow(ZoneId zone) { in dateNow() argument
406 return dateNow(Clock.system(zone)); in dateNow()
504 ZoneId zone = ZoneId.from(temporal); in zonedDateTime() local
507 return zonedDateTime(instant, zone); in zonedDateTime()
511 return ChronoZonedDateTimeImpl.ofBest(cldt, zone, null); in zonedDateTime()
528 …efault ChronoZonedDateTime<? extends ChronoLocalDate> zonedDateTime(Instant instant, ZoneId zone) { in zonedDateTime() argument
529 return ChronoZonedDateTimeImpl.ofInstant(this, instant, zone); in zonedDateTime()
/libcore/ojluni/src/main/java/sun/util/calendar/
DGregorian.java44 protected Date(TimeZone zone) { in Date() argument
45 super(zone); in Date()
76 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() argument
77 return getCalendarDate(millis, newCalendarDate(zone)); in getCalendarDate()
84 public Date newCalendarDate(TimeZone zone) { in newCalendarDate() argument
85 return new Date(zone); in newCalendarDate()
DJulianCalendar.java53 protected Date(TimeZone zone) { in Date() argument
54 super(zone); in Date()
133 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() argument
134 return getCalendarDate(millis, newCalendarDate(zone)); in getCalendarDate()
141 public Date newCalendarDate(TimeZone zone) { in newCalendarDate() argument
142 return new Date(zone); in newCalendarDate()
DEra.java109 public long getSince(TimeZone zone) { in getSince() argument
110 if (zone == null || !localTime) { in getSince()
113 int offset = zone.getOffset(since); in getSince()
/libcore/ojluni/src/main/java/java/time/zone/
DTEST_MAPPING7 "include-filter": "libcore.java.time.zone"
15 "include-filter": "tck.java.time.zone"
18 "include-filter": "tck.java.time.zone.serial"
21 "include-filter": "test.java.time.zone"
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKClock.java78 final ZoneId zone; field in TCKClock.MockInstantClock
79 MockInstantClock(long millis, ZoneId zone) { in MockInstantClock() argument
81 this.zone = zone; in MockInstantClock()
93 return zone; in getZone()
/libcore/luni/src/test/java/libcore/java/time/
DZonedDateTimeTest.java99 ZoneId zone, LocalDateTime expectedDateTime, ZoneOffset expectedOffset) { in checkOfInstant() argument
100 ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(localDateTime, offset, zone); in checkOfInstant()
102 localDateTime, offset, zone, zonedDateTime); in checkOfInstant()
105 assertEquals("zone" + message, zone, zonedDateTime.getZone()); in checkOfInstant()
168 private static void checkOfLocal(LocalDateTime localDateTime, ZoneId zone, in checkOfLocal() argument
170 ZonedDateTime zonedDateTime = ZonedDateTime.ofLocal(localDateTime, zone, preferredOffset); in checkOfLocal()
172 localDateTime, zone, preferredOffset, zonedDateTime); in checkOfLocal()
175 assertEquals("zone" + message, zone, zonedDateTime.getZone()); in checkOfLocal()
/libcore/ojluni/src/main/java/java/util/
DCalendar.java903 private TimeZone zone; field in Calendar
1082 private TimeZone zone; field in Calendar.Builder
1306 public Builder setTimeZone(TimeZone zone) { in setTimeZone() argument
1307 if (zone == null) { in setTimeZone()
1310 this.zone = zone; in setTimeZone()
1460 if (zone == null) { in build()
1461 zone = TimeZone.getDefault(); in build()
1483 cal = new GregorianCalendar(zone, locale, true); in build()
1486 GregorianCalendar gcal = new GregorianCalendar(zone, locale, true); in build()
1596 protected Calendar(TimeZone zone, Locale aLocale) in Calendar() argument
[all …]
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeParseContext.java330 parsed.zone = (parsed.zone != null ? parsed.zone : formatter.getZone()); in toResolved()
415 void setParsed(ZoneId zone) { in setParsed() argument
416 Objects.requireNonNull(zone, "zone"); in setParsed()
417 currentParsed().zone = zone; in setParsed()
DDateTimeFormatter.java512 private final ZoneId zone; field in DateTimeFormatter
1375 Chronology chrono, ZoneId zone) { in DateTimeFormatter() argument
1382 this.zone = zone; in DateTimeFormatter()
1413 …ateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone); in withLocale()
1438 …ateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone); in withDecimalStyle()
1492 …ateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone); in withChronology()
1506 return zone; in getZone()
1545 public DateTimeFormatter withZone(ZoneId zone) { in withZone() argument
1546 if (Objects.equals(this.zone, zone)) { in withZone()
1549 …ateTimeFormatter(printerParser, locale, decimalStyle, resolverStyle, resolverFields, chrono, zone); in withZone()
[all …]
DParsed.java133 ZoneId zone; field in Parsed
172 cloned.zone = this.zone; in copy()
212 return (R) zone; in query()
219 } else if (query == TemporalQueries.zone() || query == TemporalQueries.offset()) { in query()
272 if (zone == null) { in resolveFields()
273 zone = czdt.getZone(); in resolveFields()
274 } else if (zone.equals(czdt.getZone()) == false) { in resolveFields()
275 … throw new DateTimeException("ChronoZonedDateTime must use the effective parsed zone: " + zone); in resolveFields()
330 if (zone != null) { in resolveInstantFields()
331 resolveInstantFields0(zone); in resolveInstantFields()
[all …]
/libcore/ojluni/src/main/java/java/time/temporal/
DTemporalQueries.java267 public static TemporalQuery<ZoneId> zone() { in zone() method in TemporalQueries
374 ZoneId zone = temporal.query(ZONE_ID);
375 return (zone != null ? zone : temporal.query(OFFSET));
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKZoneIdPrinterParser.java115 public void test_print(LocalDateTime ldt, ZoneId zone, String expected) { in test_print() argument
116 ZonedDateTime zdt = ldt.atZone(zone); in test_print()
123 public void test_print_pattern_VV(LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_VV() argument
124 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_VV()
219 … assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + text); in test_parseSuccess_plain()
236 …assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + prefixTe… in test_parseSuccess_prefix()
252 …assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + suffixTe… in test_parseSuccess_suffix()
274 assertEquals(parsed.query(TemporalQueries.zone()), expected); in test_parseSuccess_caseSensitive()
292 … assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + lcText); in test_parseSuccess_caseInsensitive()
DTCKOffsetPrinterParser.java234 …public void test_print(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, Stri… in test_print() argument
235 ZonedDateTime zdt = ldt.atZone(zone); in test_print()
243 …pattern_X(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_X() argument
257 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_X()
265 …pattern_x(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_x() argument
285 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_x()
293 …pattern_Z(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { in test_print_pattern_Z() argument
296 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_Z()
309 ZonedDateTime zdt = ldt.atZone(zone); in test_print_pattern_Z()
/libcore/luni/src/test/java/libcore/java/time/zone/
DZoneRulesExceptionTest.java16 package libcore.java.time.zone;
19 import java.time.zone.ZoneRulesException;
DZoneOffsetTransitionTest.java16 package libcore.java.time.zone;
23 import java.time.zone.ZoneOffsetTransition;
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/
DTCKZoneOffsetTransitionRuleSerialization.java60 package tck.java.time.zone.serial;
66 import java.time.zone.ZoneOffsetTransitionRule;
67 import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition;
/libcore/ojluni/annotations/hiddenapi/java/util/
DCalendar.java54 protected Calendar(java.util.TimeZone zone, java.util.Locale aLocale) { in Calendar() argument
62 public static java.util.Calendar getInstance(java.util.TimeZone zone) { in getInstance() argument
71 java.util.TimeZone zone, java.util.Locale aLocale) { in getInstance() argument
76 java.util.TimeZone zone, java.util.Locale aLocale) { in getJapaneseImperialInstance() argument
81 java.util.TimeZone zone, java.util.Locale aLocale) { in createCalendar() argument
595 private java.util.TimeZone zone; field in Calendar
651 public java.util.Calendar.Builder setTimeZone(java.util.TimeZone zone) { in setTimeZone() argument
718 private java.util.TimeZone zone; field in Calendar.Builder
/libcore/ojluni/src/test/java/time/tck/java/time/zone/
DTCKFixedZoneRules.java60 package tck.java.time.zone;
74 import java.time.zone.ZoneOffsetTransition;
75 import java.time.zone.ZoneOffsetTransitionRule;
76 import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition;
77 import java.time.zone.ZoneRules;
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DSimpleTimeZoneTest.java403 SimpleTimeZone zone = new SimpleTimeZone(tz.getRawOffset(), "EST", in test_inDaylightTimeLjava_util_Date() local
407 assertTrue("Returned incorrect daylight value1", zone.inDaylightTime(gc in test_inDaylightTimeLjava_util_Date()
410 assertTrue("Returned incorrect daylight value2", !(zone in test_inDaylightTimeLjava_util_Date()
412 gc = new GregorianCalendar(zone); in test_inDaylightTimeLjava_util_Date()
414 assertTrue("Returned incorrect daylight value3", !(zone in test_inDaylightTimeLjava_util_Date()
417 assertTrue("Returned incorrect daylight value4", zone in test_inDaylightTimeLjava_util_Date()
420 assertTrue("Returned incorrect daylight value5", !(zone in test_inDaylightTimeLjava_util_Date()
423 assertTrue("Returned incorrect daylight value6", zone in test_inDaylightTimeLjava_util_Date()
426 assertTrue("Returned incorrect daylight value7", !zone in test_inDaylightTimeLjava_util_Date()
428 assertTrue("Returned incorrect daylight value8", zone in test_inDaylightTimeLjava_util_Date()
[all …]

12345