Uses of Class
java.util.TimeZone
Packages that useTimeZone 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, 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.javax.xml.datatype Defines XML/Java Type Mappings.Uses ofTimeZone injava.text
Methods injava.text that returnTimeZone Modifier and Type Method Description TimeZoneDateFormat. getTimeZone()Gets the time zone.Methods injava.text with parameters of typeTimeZone Modifier and Type Method Description voidDateFormat. setTimeZone(TimeZone zone)Sets the time zone for the calendar of thisDateFormatobject.Uses ofTimeZone injava.util
Subclasses ofTimeZone injava.util Modifier and Type Class Description classSimpleTimeZoneSimpleTimeZoneis a concrete subclass ofTimeZonethat represents a time zone for use with a Gregorian calendar.Methods injava.util that returnTimeZone Modifier and Type Method Description staticTimeZoneTimeZone. getDefault()Gets the defaultTimeZoneof the Java virtual machine.TimeZoneCalendar. getTimeZone()Gets the time zone.staticTimeZoneTimeZone. getTimeZone(String ID)Gets theTimeZonefor the given ID.staticTimeZoneTimeZone. getTimeZone(ZoneId zoneId)Gets theTimeZonefor the givenzoneId.Methods injava.util with parameters of typeTimeZone Modifier and Type Method Description staticCalendarCalendar. getInstance(TimeZone zone)Gets a calendar using the specified time zone and default locale.staticCalendarCalendar. getInstance(TimeZone zone,Locale aLocale)Gets a calendar with the specified time zone and locale.booleanSimpleTimeZone. hasSameRules(TimeZone other)Returnstrueif this zone has the same rules and offset as another zone.booleanTimeZone. hasSameRules(TimeZone other)Returns true if this zone has the same rule and offset as another zone.static voidTimeZone. setDefault(TimeZone zone)Sets theTimeZonethat is returned by thegetDefaultmethod.Calendar.BuilderCalendar.Builder. setTimeZone(TimeZone zone)Sets the time zone parameter to the givenzone.voidCalendar. setTimeZone(TimeZone value)Sets the time zone with the given time zone value.Constructors injava.util with parameters of typeTimeZone Constructor Description Calendar(TimeZone zone,Locale aLocale)Constructs a calendar with the specified time zone and locale.GregorianCalendar(TimeZone zone)Constructs aGregorianCalendarbased on the current time in the given time zone with the defaultFORMATlocale.GregorianCalendar(TimeZone zone,Locale aLocale)Constructs aGregorianCalendarbased on the current time in the given time zone with the given locale.Uses ofTimeZone injavax.xml.datatype
Methods injavax.xml.datatype that returnTimeZone Modifier and Type Method Description abstractTimeZoneXMLGregorianCalendar. getTimeZone(int defaultZoneoffset)Returns ajava.util.TimeZonefor this class.Methods injavax.xml.datatype with parameters of typeTimeZone Modifier and Type Method Description abstractGregorianCalendarXMLGregorianCalendar. toGregorianCalendar(TimeZone timezone,Locale aLocale,XMLGregorianCalendar defaults)Convert thisXMLGregorianCalendaralong with provided parameters to aGregorianCalendarinstance.