| Package | Description |
|---|---|
| java.text |
Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
|
| java.util |
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
|
| javax.xml.datatype |
XML/Java Type Mappings.
|
| Modifier and Type | Method and Description |
|---|---|
TimeZone |
DateFormat.getTimeZone()
Gets the time zone.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DateFormat.setTimeZone(TimeZone
Sets the time zone for the calendar of this
DateFormat object.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SimpleTimeZone
SimpleTimeZone is a concrete subclass of
TimeZone that represents a time zone for use with a Gregorian calendar.
|
| Modifier and Type | Method and Description |
|---|---|
static TimeZone |
TimeZone.getDefault()
Gets the default
TimeZone of the Java virtual machine.
|
TimeZone |
Calendar.getTimeZone()
Gets the time zone.
|
TimeZone |
GregorianCalendar.getTimeZone()
|
static TimeZone |
TimeZone.getTimeZone(String
Gets the
TimeZone for the given ID.
|
static TimeZone |
TimeZone.getTimeZone(ZoneId
Gets the
TimeZone for the given
zoneId.
|
| Modifier and Type | Method and Description |
|---|---|
static Calendar |
Calendar.getInstance(TimeZone
Gets a calendar using the specified time zone and default locale.
|
static Calendar |
Calendar.getInstance(TimeZone
Gets a calendar with the specified time zone and locale.
|
boolean |
TimeZone.hasSameRules(TimeZone
Returns true if this zone has the same rule and offset as another zone.
|
boolean |
SimpleTimeZone.hasSameRules(TimeZone
Returns
true if this zone has the same rules and offset as another zone.
|
static void |
TimeZone.setDefault(TimeZone
Sets the
TimeZone that is returned by the
getDefault method.
|
void |
Calendar.setTimeZone(TimeZone
Sets the time zone with the given time zone value.
|
Calendar |
Calendar.Builder.setTimeZone(TimeZone
Sets the time zone parameter to the given
zone.
|
void |
GregorianCalendar.setTimeZone(TimeZone
|
| Constructor and Description | |
|---|---|
Calendar(TimeZone
Constructs a calendar with the specified time zone and locale.
|
|
GregorianCalendar(TimeZone
Constructs a
GregorianCalendar based on the current time in the given time zone with the default
FORMAT locale.
|
|
GregorianCalendar(TimeZone
Constructs a
GregorianCalendar based on the current time in the given time zone with the given locale.
|
| Modifier and Type | Method and Description |
|---|---|
abstract TimeZone |
XMLGregorianCalendar.getTimeZone(int defaultZoneoffset)
Returns a
java.util.TimeZone for this class.
|
| Modifier and Type | Method and Description |
|---|---|
abstract GregorianCalendar |
XMLGregorianCalendar.toGregorianCalendar(TimeZone
Convert this
XMLGregorianCalendar along with provided parameters to a
GregorianCalendar instance.
|