Lines Matching defs:TimeZone

54  * <code>TimeZone</code> represents a time zone offset, and also figures out daylight
58 * Typically, you get a <code>TimeZone</code> using <code>getDefault</code>
59 * which creates a <code>TimeZone</code> based on the time zone where the program
61 * creates a <code>TimeZone</code> object based on Japanese Standard Time.
64 * You can also get a <code>TimeZone</code> using <code>getTimeZone</code>
67 * U.S. Pacific Time <code>TimeZone</code> object with:
69 * TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
73 * supported ID to get a <code>TimeZone</code>.
76 * produce a TimeZone. The syntax of a custom time zone ID is:
104 * When creating a <code>TimeZone</code>, the specified custom time
118 * For example, TimeZone.getTimeZone("GMT-8").getID() returns "GMT-08:00".
136 abstract public class TimeZone implements Serializable, Cloneable {
141 public TimeZone() {
173 * underlying <code>TimeZone</code> implementation subclass
201 * underlying TimeZone implementation subclass supports historical
251 * If an underlying <code>TimeZone</code> implementation subclass
267 * If an underlying <code>TimeZone</code> implementation subclass
302 * Returns a long standard time name of this {@code TimeZone} suitable for
323 * Returns a long standard time name of this {@code TimeZone} suitable for
342 * Returns a name in the specified {@code style} of this {@code TimeZone}
345 * is returned (even if this {@code TimeZone} doesn't observe Daylight Saving
371 * Returns a name in the specified {@code style} of this {@code TimeZone}
374 * Saving Time name is returned (even if this {@code TimeZone} doesn't
471 * <p>If an underlying {@code TimeZone} implementation subclass
479 * TimeZone} and the time stamp, and call {@link Calendar#get(int)
497 * Queries if this {@code TimeZone} uses Daylight Saving Time.
499 * <p>If an underlying {@code TimeZone} implementation subclass
506 * @return {@code true} if this {@code TimeZone} uses Daylight Saving Time,
514 * Returns {@code true} if this {@code TimeZone} is currently in
522 * @return {@code true} if this {@code TimeZone} is currently in
546 * Gets the <code>TimeZone</code> for the given ID.
548 * @param ID the ID for a <code>TimeZone</code>, either an abbreviation
553 * @return the specified <code>TimeZone</code>, or the GMT zone if the given ID
556 public static synchronized TimeZone getTimeZone(String ID) {
560 private static TimeZone getTimeZone(String ID, boolean fallback) {
561 TimeZone tz = ZoneInfo.getTimeZone(ID);
593 * Gets the platform defined TimeZone ID.
605 * Gets the default <code>TimeZone</code> for this host.
606 * The source of the default <code>TimeZone</code>
608 * @return a default <code>TimeZone</code>.
611 public static TimeZone getDefault() {
612 return (TimeZone) getDefaultRef().clone();
616 * Returns the reference to the default TimeZone object. This
619 static TimeZone getDefaultRef() {
620 TimeZone defaultZone = getDefaultInAppContext();
633 private static synchronized TimeZone setDefaultZone() {
634 TimeZone tz = null;
699 * Sets the <code>TimeZone</code> that is
706 public static void setDefault(TimeZone zone)
709 synchronized (TimeZone.class) {
719 * Returns the default TimeZone in an AppContext if any AppContext
721 * used or if the AppContext doesn't have the default TimeZone.
728 private static TimeZone getDefaultInAppContext() {
735 TimeZone tz = (TimeZone)
736 javaAWTAccess.get(TimeZone.class);
748 * Sets the default TimeZone in the AppContext to the given
750 * hasn't been used, remove the default TimeZone in the
758 private static void setDefaultInAppContext(TimeZone tz) {
765 javaAWTAccess.put(TimeZone.class, tz);
777 * @param other the <code>TimeZone</code> object to be compared with
782 public boolean hasSameRules(TimeZone other) {
788 * Creates a copy of this <code>TimeZone</code>.
790 * @return a clone of this <code>TimeZone</code>
795 TimeZone other = (TimeZone) super.clone();
804 * The null constant as a TimeZone.
806 static final TimeZone NO_TIMEZONE = null;
811 * The string identifier of this <code>TimeZone</code>. This is a
812 * programmatic identifier used internally to look up <code>TimeZone</code>
819 private static volatile TimeZone defaultTimeZone;
824 // a static TimeZone we can reference if no AppContext is in place
825 private static volatile TimeZone mainAppContextDefault;
832 * @return a newly created TimeZone with the given offset and
835 private static final TimeZone parseCustomTimeZone(String id) {