public class TimeZone
extends java.lang.Object
| Constructor and Description |
|---|
TimeZone()
Initializes a new instance of the TimeZone class.
|
TimeZone(Duration offset)
Initializes a new instance of the TimeZone class.
|
TimeZone(Duration offset,
java.lang.String name)
Initializes a new instance of the TimeZone class.
|
TimeZone(Duration offset,
java.lang.String name,
TimeChange standardTime,
TimeChange daylightTime)
Initializes a new instance of the TimeZone class.
|
TimeZone(Duration offset,
TimeChange standardTime,
TimeChange daylightTime)
Initializes a new instance of the TimeZone class.
|
TimeZone(int offsetHours)
Initializes a new instance of the TimeZone class.
|
TimeZone(int offsetHours,
int offsetMinutes)
Initializes a new instance of the TimeZone class.
|
TimeZone(StandardTimeZone standardTimeZone)
Initializes a new instance of the TimeZone class.
|
| Modifier and Type | Method and Description |
|---|---|
TimeChange |
getDaylightTime()
Gets the date and time when the time changes from daylight saving time to standard time.
|
java.lang.String |
getName()
Gets the name of the time zone.
|
Duration |
getOffset()
Gets the hourly offset from UTC for the current time zone.
|
TimeChange |
getStandardTime()
Gets the date and time when the time changes from daylight saving time to standard time.
|
void |
setDaylightTime(TimeChange daylightTime)
Sets the date and time when the time changes from daylight saving time to standard time.
|
void |
setName(java.lang.String name)
Sets the name of the time zone.
|
void |
setOffset(Duration offset)
Sets the hourly offset from UTC for the current time zone.
|
void |
setStandardTime(TimeChange standardTime)
Sets the date and time when the time changes from daylight saving time to standard time.
|
java.lang.String |
toString()
Converts the value of the current TimeZone object to its equivalent string representation.
|
public TimeZone()
public TimeZone(StandardTimeZone standardTimeZone)
standardTimeZone - the standard time zonepublic TimeZone(int offsetHours)
offsetHours - the offset hourspublic TimeZone(int offsetHours,
int offsetMinutes)
offsetHours - the offset hoursoffsetMinutes - the offset minutespublic TimeZone(Duration offset)
offset - the offsetpublic TimeZone(Duration offset, java.lang.String name)
offset - the offsetname - the namepublic TimeZone(Duration offset, TimeChange standardTime, TimeChange daylightTime)
offset - the offsetstandardTime - the standard timedaylightTime - the daylight timepublic TimeZone(Duration offset, java.lang.String name, TimeChange standardTime, TimeChange daylightTime)
offset - the offsetname - the namestandardTime - the standard timedaylightTime - the daylight timepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the new namepublic Duration getOffset()
public void setOffset(Duration offset)
offset - the new offsetpublic TimeChange getStandardTime()
public void setStandardTime(TimeChange standardTime)
standardTime - the new standard timepublic TimeChange getDaylightTime()
public void setDaylightTime(TimeChange daylightTime)
daylightTime - the new daylight time