Lines Matching defs:TimeZone

29  * {@code TimeZone} represents a time zone offset, taking into account
32 * Typically, you get a {@code TimeZone} using {@code getDefault}
33 * which creates a {@code TimeZone} based on the time zone where the
35 * {@code getDefault} creates a {@code TimeZone} object based on
38 * You can also get a {@code TimeZone} using {@code getTimeZone}
41 * Time {@code TimeZone} object with the following: <blockquote>
44 * TimeZone tz = TimeZone.getTimeZone(&quot;America/Los_Angeles&quot;);
49 * to get a {@code TimeZone}. If the time zone you want is not
58 * ID. The {@code TimeZone} that is returned when you specify a custom
78 public abstract class TimeZone implements Serializable, Cloneable {
92 // private static HashMap<String, TimeZone> AvailableZones;
95 private static TimeZone Default;
97 static TimeZone GMT = new SimpleTimeZone(0, "GMT"); // Greenwich Mean Time
102 // private com.ibm.icu.util.TimeZone icuTimeZone = null;
105 // TimeZone[] zones = TimeZones.getTimeZones();
106 // AvailableZones = new HashMap<String, TimeZone>(
115 // String[] availableIDs = com.ibm.icu.util.TimeZone.getAvailableIDs();
125 // com.ibm.icu.util.TimeZone icuTZ = com.ibm.icu.util.TimeZone
128 // TimeZone zone = new SimpleTimeZone(raw, name);
136 public TimeZone() {
140 * Returns a new {@code TimeZone} with the same ID, {@code rawOffset} and daylight savings
141 * time rules as this {@code TimeZone}.
143 * @return a shallow copy of this {@code TimeZone}.
149 TimeZone zone = (TimeZone) super.clone();
158 * {@code get()} to create the corresponding {@code TimeZone} instance.
164 // return com.ibm.icu.util.TimeZone.getAvailableIDs();
172 * {@code TimeZone} instance.
180 // String[] availableIDs = com.ibm.icu.util.TimeZone.getAvailableIDs();
185 // com.ibm.icu.util.TimeZone tz = com.ibm.icu.util.TimeZone
203 public static synchronized TimeZone getDefault() {
210 return (TimeZone) Default.clone();
214 * Gets the LONG name for this {@code TimeZone} for the default {@code Locale} in standard
218 * @return the {@code TimeZone} name.
225 * Gets the LONG name for this {@code TimeZone} for the specified {@code Locale} in standard
231 * @return the {@code TimeZone} name.
238 * Gets the specified style of name ({@code LONG} or {@code SHORT}) for this {@code TimeZone} for
247 * @return the {@code TimeZone} name.
254 * Gets the specified style of name ({@code LONG} or {@code SHORT}) for this {@code TimeZone} for
265 * @return the {@code TimeZone} name.
270 // icuTimeZone = com.ibm.icu.util.TimeZone.getTimeZone(ID);
317 * Gets the ID of this {@code TimeZone}.
326 * Gets the daylight savings offset in milliseconds for this {@code TimeZone}.
337 * {@code TimeZone} sometimes observes daylight savings.
339 * @return the daylight savings offset in milliseconds if this {@code TimeZone}
350 * Gets the offset from GMT of this {@code TimeZone} for the specified date. The
366 * Gets the offset from GMT of this {@code TimeZone} for the specified date and
389 * Gets the offset for standard time from GMT for this {@code TimeZone}.
396 * Gets the {@code TimeZone} with the specified ID.
400 * @return the {@code TimeZone} with the specified ID or null if no {@code TimeZone} with
403 public static synchronized TimeZone getTimeZone(String name) {
409 // TimeZone zone = AvailableZones.get(name);
414 TimeZone zone = ZoneInfo.getTimeZone(name);
424 return (TimeZone) GMT.clone();
434 return (TimeZone) GMT.clone();
449 return (TimeZone) zone.clone();
482 * Returns whether the specified {@code TimeZone} has the same raw offset as this
483 * {@code TimeZone}.
486 * a {@code TimeZone}.
487 * @return {@code true} when the {@code TimeZone} have the same raw offset, {@code false}
490 public boolean hasSameRules(TimeZone zone) {
499 * this {@code TimeZone}.
526 * a {@code TimeZone} object.
528 public static synchronized void setDefault(TimeZone timezone) {
552 // // if returned TimeZone is a user customized TimeZone
567 // // get TimeZone
586 // private static void setICUDefaultTimeZone(TimeZone timezone) {
587 // final com.ibm.icu.util.TimeZone icuTZ = com.ibm.icu.util.TimeZone
595 // field = com.ibm.icu.util.TimeZone.class
609 * Sets the ID of this {@code TimeZone}.
622 * Sets the offset for standard time from GMT for this {@code TimeZone}.
630 * Returns whether this {@code TimeZone} has a daylight savings time period.
633 * {@code TimeZone} sometimes observes daylight savings. You need to call
643 * @return {@code true} if this {@code TimeZone} has a daylight savings time period, {@code false}
649 * Gets the name and the details of the user-selected TimeZone on the
653 * int array of 10 elements to be filled with the TimeZone
665 * @return the name of the TimeZone or null if error occurs in native