Uses of Class
java.util.TimeZone
Package
Description
Provides classes and interfaces for handling text, dates, numbers,
and messages in a manner independent of natural languages.
Contains the collections framework, some internationalization support classes,
a service loader, properties, random number generation, string parsing
and scanning classes, base64 encoding and decoding, a bit array, and
several miscellaneous utility classes.
Defines XML/Java Type Mappings.
-
Uses of TimeZone in java.text
Modifier and TypeMethodDescriptionvoid
DateFormat.setTimeZone(TimeZone zone)
Sets the time zone for the calendar of thisDateFormat
object. -
Uses of TimeZone in java.util
Modifier and TypeClassDescriptionclass
SimpleTimeZone
is a concrete subclass ofTimeZone
that represents a time zone for use with a Gregorian calendar.Modifier and TypeMethodDescriptionstatic TimeZone
TimeZone.getDefault()
Gets the defaultTimeZone
of the Java virtual machine.Calendar.getTimeZone()
Gets the time zone.static TimeZone
TimeZone.getTimeZone(String ID)
Gets theTimeZone
for the given ID.static TimeZone
TimeZone.getTimeZone(ZoneId zoneId)
Gets theTimeZone
for the givenzoneId
.Modifier and TypeMethodDescriptionstatic Calendar
Calendar.getInstance(TimeZone zone)
Gets a calendar using the specified time zone and default locale.static Calendar
Calendar.getInstance(TimeZone zone, Locale aLocale)
Gets a calendar with the specified time zone and locale.boolean
SimpleTimeZone.hasSameRules(TimeZone other)
Returnstrue
if this zone has the same rules and offset as another zone.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 theTimeZone
that is returned by thegetDefault
method.Calendar.Builder.setTimeZone(TimeZone zone)
Sets the time zone parameter to the givenzone
.void
Calendar.setTimeZone(TimeZone value)
Sets the time zone with the given time zone value.ModifierConstructorDescriptionprotected
Constructs a calendar with the specified time zone and locale.GregorianCalendar(TimeZone zone)
Constructs aGregorianCalendar
based on the current time in the given time zone with the defaultFORMAT
locale.GregorianCalendar(TimeZone zone, Locale aLocale)
Constructs aGregorianCalendar
based on the current time in the given time zone with the given locale. -
Uses of TimeZone in javax.xml.datatype
Modifier and TypeMethodDescriptionabstract TimeZone
XMLGregorianCalendar.getTimeZone(int defaultZoneoffset)
Returns ajava.util.TimeZone
for this class.Modifier and TypeMethodDescriptionabstract GregorianCalendar
XMLGregorianCalendar.toGregorianCalendar(TimeZone timezone, Locale aLocale, XMLGregorianCalendar defaults)
Convert thisXMLGregorianCalendar
along with provided parameters to aGregorianCalendar
instance.