Searched refs:ZoneId (Results 1 - 25 of 111) sorted by relevance

12345

/openjdk9/nashorn/samples/
H A Ddateconversion.js41 var ZoneId = java.time.ZoneId; variable
56 // https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html#ofInstant-java.time.Instant-java.time.ZoneId-
58 var ldt = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
63 // https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html#atZone-java.time.ZoneId-
65 var instant = ldt.atZone(ZoneId.systemDefault()).toInstant();
H A Ddatetime.js41 var ZoneId = java.time.ZoneId; variable
56 // https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html#ofInstant-java.time.Instant-java.time.ZoneId-
58 var ldt = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
63 // https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html#atZone-java.time.ZoneId-
65 var instant = ldt.atZone(ZoneId.systemDefault()).toInstant();
/openjdk9/jdk/test/java/time/tck/java/time/
H A DTCKClock.java66 import java.time.ZoneId;
78 final ZoneId zone;
79 MockInstantClock(long millis, ZoneId zone) {
92 public ZoneId getZone() {
96 public Clock withZone(ZoneId timeZone) {
114 private static final ZoneId ZONE = ZoneId.of("Europe/Paris");
127 ZoneId london = ZoneId.of("Europe/London");
H A DTCKZoneId.java74 import java.time.ZoneId;
91 * Test ZoneId.
100 Map<String, String> ids = ZoneId.SHORT_IDS;
133 Map<String, String> ids = ZoneId.SHORT_IDS;
142 Set<String> zoneIds = ZoneId.getAvailableZoneIds();
146 Set<String> zoneIds2 = ZoneId.getAvailableZoneIds();
158 ZoneId test = ZoneId.of("LONDON", map);
167 ZoneId test = ZoneId
[all...]
H A DTCKClock_System.java67 import java.time.ZoneId;
78 private static final ZoneId MOSCOW = ZoneId.of("Europe/Moscow");
79 private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
119 assertEquals(test.getZone(), ZoneId.systemDefault());
120 assertEquals(test, Clock.system(ZoneId.systemDefault()));
/openjdk9/jdk/test/java/time/tck/java/time/format/
H A DTCKZoneIdPrinterParser.java68 import java.time.ZoneId;
90 private static final ZoneId EUROPE_PARIS = ZoneId.of("Europe/Paris");
91 private static final ZoneId AMERICA_NEW_YORK = ZoneId.of("America/New_York");
115 public void test_print(LocalDateTime ldt, ZoneId zone, String expected) {
123 public void test_print_pattern_VV(LocalDateTime ldt, ZoneId zone, String expected) {
155 {"Z", 1, -1, ZoneId.of("Z"), true},
156 {"UTC", 3, -1, ZoneId.of("UTC"), false},
157 {"UT", 2, -1, ZoneId
[all...]
H A DTCKFormatStyle.java60 import java.time.ZoneId;
80 private static final ZoneId ZONEID_PARIS = ZoneId.of("Europe/Paris");
81 private static final ZoneId OFFSET_PTWO = ZoneOffset.of("+02:00");
/openjdk9/jdk/test/java/time/tck/java/time/serial/
H A DTCKZoneIdSerialization.java72 import java.time.ZoneId;
79 * Test serialization of ZoneId.
87 assertSerializable(ZoneId.of("Europe/London"));
88 assertSerializable(ZoneId.of("America/Chicago"));
99 assertSerializedBySer(ZoneId.of("Europe/London"), bytes);
106 ZoneId deser = deserialize(id);
131 ZoneId deserialized = deserialize(input);
132 assertEquals(deserialized, ZoneId.of(input));
133 assertEquals(deserialized, ZoneId.of(resolvedId));
138 ZoneId deserialize
[all...]
H A DTCKClockSerialization.java68 import java.time.ZoneId;
82 private static final ZoneId MOSCOW = ZoneId.of("Europe/Moscow");
83 private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
H A DTCKZonedDateTimeSerialization.java70 import java.time.ZoneId;
81 private static final ZoneId ZONE_0100 = OFFSET_0100;
82 private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris");
117 ZonedDateTime zdt = LocalDateTime.of(2012, 9, 16, 22, 17, 59, 470_000_000).atZone(ZoneId.of("Europe/London"));
/openjdk9/jdk/test/java/time/test/java/time/
H A DTestClock_Tick.java68 import java.time.ZoneId;
80 private static final ZoneId MOSCOW = ZoneId.of("Europe/Moscow");
81 private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
H A DTestClock_Fixed.java68 import java.time.ZoneId;
79 private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
H A DTestClock_Offset.java67 import java.time.ZoneId;
77 private static final ZoneId PARIS = ZoneId.of("Europe/Paris");
H A DTestZoneId.java72 import java.time.ZoneId;
87 * Test ZoneId.
99 // cannot use standard test as ZoneId is abstract
100 Class<ZoneId> cls = ZoneId.class;
116 ZoneId test = ZoneOffset.UTC;
128 ZoneId test = ZoneId.systemDefault();
137 ZoneId.systemDefault();
148 ZoneId
[all...]
/openjdk9/jdk/test/sun/util/locale/provider/
H A DBug8024141.java31 import java.time.ZoneId;
45 ZoneId gmt = ZoneId.of("GMT");
50 ZoneId id = ZoneId.of(zone);
/openjdk9/jdk/src/java.base/share/classes/java/time/temporal/
H A DTemporalQueries.java70 import java.time.ZoneId;
104 * {@code LocalDate::from} and {@code ZoneId::from}.
136 * A strict query for the {@code ZoneId}.
139 * The zone is only returned if the date-time conceptually contains a {@code ZoneId}.
167 public static TemporalQuery<ZoneId> zoneId() {
250 * A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}.
260 * The method {@link ZoneId#from(TemporalAccessor)} can be used as a
261 * {@code TemporalQuery} via a method reference, {@code ZoneId::from}.
267 public static TemporalQuery<ZoneId> zone() {
342 * A strict query for the {@code ZoneId}
[all...]
/openjdk9/jdk/test/java/time/tck/java/time/zone/serial/
H A DTCKZoneRulesSerialization.java68 import java.time.ZoneId;
105 return ZoneId.of("Europe/London").getRules();
113 return ZoneId.of("Europe/Paris").getRules();
120 return ZoneId.of("America/New_York").getRules();
/openjdk9/jdk/src/java.base/share/classes/java/time/
H A DClock.java102 * This approach allows an alternate clock, such as {@link #fixed(Instant, ZoneId) fixed}
178 * It is equivalent to {@code system(ZoneId.systemDefault())}.
181 * @see ZoneId#systemDefault()
184 return new SystemClock(ZoneId.systemDefault());
202 public static Clock system(ZoneId zone) {
218 * using {@link #system(ZoneId)}.
231 public static Clock tickMillis(ZoneId zone) {
243 * using {@link #system(ZoneId)}.
255 public static Clock tickSeconds(ZoneId zone) {
266 * using {@link #system(ZoneId)}
[all...]
H A DZoneId.java91 * A {@code ZoneId} is used to identify the rules used to convert between
101 * Calling {@link #normalized()} on any {@code ZoneId} will ensure that a
109 * The distinction has other effects. Serializing the {@code ZoneId} will only send
155 * A {@code ZoneId} can be deserialized in a Java Runtime where the ID is unknown.
157 * the client-side Java Runtime has not been updated. In this case, the {@code ZoneId}
168 * {@code ZoneId} may have unpredictable results and should be avoided.
178 public abstract class ZoneId implements Serializable { class in inherits:Serializable
264 * and converts it to a {@code ZoneId}. If the system default time-zone is changed,
271 public static ZoneId systemDefault() {
280 * The ID can be passed to {@link #of(String)} to create a {@code ZoneId}
472 ZoneId() { method in class:ZoneId
[all...]
/openjdk9/jdk/test/java/time/test/java/time/format/
H A DTestZoneTextPrinterParser.java29 import java.time.ZoneId;
83 zdt = zdt.withZoneSameLocal(ZoneId.of(zid));
129 private static Set<ZoneId> preferred = new HashSet<>(Arrays.asList(new ZoneId[] {
130 ZoneId.of("EST", ZoneId.SHORT_IDS),
131 ZoneId.of("Asia/Taipei"),
132 ZoneId.of("Asia/Macau"),
133 ZoneId.of("CET"),
136 private static Set<ZoneId> preferred_
[all...]
/openjdk9/jdk/test/java/util/Calendar/
H A DJavatimeTest.java34 import java.time.ZoneId;
80 cal.setTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault()));
99 ZonedDateTime zdt = ZonedDateTime.of(ldt_ms, ZoneId.systemDefault());
119 ZoneId zid = ZoneId.of(zidStr, ZoneId.SHORT_IDS);
126 && !ZoneId.SHORT_IDS.containsKey(zidStr)
/openjdk9/jdk/src/java.base/share/classes/java/time/chrono/
H A DChronoZonedDateTimeImpl.java74 import java.time.ZoneId;
123 private final transient ZoneId zone;
135 ChronoLocalDateTimeImpl<R> localDateTime, ZoneId zone, ZoneOffset preferredOffset) {
170 static ChronoZonedDateTimeImpl<?> ofInstant(Chronology chrono, Instant instant, ZoneId zone) {
187 private ChronoZonedDateTimeImpl<D> create(Instant instant, ZoneId zone) {
218 private ChronoZonedDateTimeImpl(ChronoLocalDateTimeImpl<D> dateTime, ZoneOffset offset, ZoneId zone) {
261 public ZoneId getZone() {
266 public ChronoZonedDateTime<D> withZoneSameLocal(ZoneId zone) {
271 public ChronoZonedDateTime<D> withZoneSameInstant(ZoneId zone) {
359 ZoneId zon
[all...]
/openjdk9/jdk/src/java.base/share/classes/java/util/
H A DTimeZone.java44 import java.time.ZoneId;
524 * @param zoneId a {@link ZoneId} from which the time zone ID is obtained
530 public static TimeZone getTimeZone(ZoneId zoneId) {
542 * Converts this {@code TimeZone} object to a {@code ZoneId}.
544 * @return a {@code ZoneId} representing the same time zone as this
548 public ZoneId toZoneId() {
549 ZoneId zId = zoneId;
556 private ZoneId toZoneId0() {
568 return ZoneId.of("America/New_York");
570 return ZoneId
[all...]
/openjdk9/jdk/make/src/classes/build/tools/classlist/
H A DHelloClasslist.java36 import java.time.ZoneId;
70 LocalDateTime.now(ZoneId.of("GMT")));
/openjdk9/jdk/src/java.logging/share/classes/java/util/logging/
H A DSimpleFormatter.java30 import java.time.ZoneId;
88 * in the {@link ZoneId#systemDefault()} system time zone.</li>
158 record.getInstant(), ZoneId.systemDefault());

Completed in 215 milliseconds

12345