Package | Description |
---|---|
java.util |
Contains the collections framework, legacy collection classes, event model,
date and time facilities, random-number generator, and miscellaneous utility
classes.
|
Modifier and Type | Method and Description |
---|---|
static TimeZone |
TimeZone.getDefault()
Gets the default
TimeZone for this host. |
TimeZone |
Calendar.getTimeZone()
Gets the time zone.
|
static TimeZone |
TimeZone.getTimeZone(String ID)
Gets the
TimeZone for the given ID. |
Modifier and Type | Method and Description |
---|---|
static Calendar |
Calendar.getInstance(TimeZone zone)
Gets a calendar using the specified time zone and default locale.
|
boolean |
TimeZone.hasSameRules(TimeZone other)
Returns true if this zone has the same rule and offset as another zone.
|
static void |
TimeZone.setDefault(TimeZone zone)
Sets the
TimeZone that is
returned by the getDefault method. |
void |
Calendar.setTimeZone(TimeZone value)
Sets the time zone with the given time zone value.
|
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.