Java java.util TimeZone fields, constructors, methods, implement or subclass

Example usage for Java java.util TimeZone fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util TimeZone.

The text is from its open source code.

Field

intSHORT
A style specifier for getDisplayName() indicating a short name, such as "PST."
intLONG
A style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."

Method

Objectclone()
Creates a copy of this TimeZone.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
String[]getAvailableIDs()
Gets all the available IDs supported.
String[]getAvailableIDs(int rawOffset)
Gets the available IDs according to the given time zone offset in milliseconds.
TimeZonegetDefault()
Gets the default TimeZone of the Java virtual machine.
StringgetDisplayName()
Returns a long standard time name of this TimeZone suitable for presentation to the user in the default locale.
StringgetDisplayName(boolean daylight, int style)
Returns a name in the specified style of this TimeZone suitable for presentation to the user in the default locale.
StringgetDisplayName(boolean daylight, int style, Locale locale)
Returns a name in the specified style of this TimeZone suitable for presentation to the user in the specified locale .
StringgetDisplayName(Locale locale)
Returns a long standard time name of this TimeZone suitable for presentation to the user in the specified locale .
intgetDSTSavings()
Returns the amount of time to be added to local standard time to get local wall clock time.
StringgetID()
Gets the ID of this time zone.
intgetOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds)
Gets the time zone offset, for current date, modified in case of daylight savings.
intgetOffset(long date)
Returns the offset of this time zone from UTC at the specified date.
intgetRawOffset()
Returns the amount of time in milliseconds to add to UTC to get standard time in this time zone.
TimeZonegetTimeZone(String ID)
Gets the TimeZone for the given ID.
TimeZonegetTimeZone(ZoneId zoneId)
Gets the TimeZone for the given zoneId .
booleanhasSameRules(TimeZone other)
Returns true if this zone has the same rule and offset as another zone.
booleaninDaylightTime(Date date)
Queries if the given date is in Daylight Saving Time in this time zone.
booleanobservesDaylightTime()
Returns true if this TimeZone is currently in Daylight Saving Time, or if a transition from Standard Time to Daylight Saving Time occurs at any future time.
voidsetDefault(TimeZone zone)
Sets the TimeZone that is returned by the getDefault method.
voidsetID(String ID)
Sets the time zone ID.
voidsetRawOffset(int offsetMillis)
Sets the base time zone offset to GMT.
ZoneIdtoZoneId()
Converts this TimeZone object to a ZoneId .
booleanuseDaylightTime()
Queries if this TimeZone uses Daylight Saving Time.