|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.TimeZone
java.util.SimpleTimeZone
public class SimpleTimeZone
SimpleTimeZone represents a local time zone and its daylight savings time rules for the gregorian calendar.
Calendar,
TimeZone,
Serialized Form| Field Summary | |
|---|---|
static int |
STANDARD_TIME
|
static int |
UTC_TIME
|
static int |
WALL_TIME
|
| Fields inherited from class java.util.TimeZone |
|---|
GMT, LONG, SHORT |
| Constructor Summary | |
|---|---|
SimpleTimeZone(int offset,
String name)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT and the specified time zone ID. |
|
SimpleTimeZone(int offset,
String name,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time. |
|
SimpleTimeZone(int offset,
String name,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime,
int daylightSavings)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID and the rules for daylight savings time. |
|
SimpleTimeZone(int offset,
String name,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int startTimeMode,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime,
int endTimeMode,
int daylightSavings)
Constructs a new SimpleTimeZone using the specified offset for standard time from GMT, the specified time zone ID, the rules for daylight savings time, and the modes indicating UTC, standard, or wall time. |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a new SimpleTimeZone with the same ID, rawOffset and daylight savings time rules as this SimpleTimeZone. |
boolean |
equals(Object object)
Compares the specified object to this SimpleTimeZone and answer if they are equal. |
int |
getDSTSavings()
Gets the daylight savings offset in milliseconds for this SimpleTimeZone. |
int |
getOffset(int era,
int year,
int month,
int day,
int dayOfWeek,
int time)
Gets the offset from GMT of this SimpleTimeZone for the specified date and time. |
int |
getOffset(long time)
Gets the offset from GMT of this SimpleTimeZone for the specified date. |
int |
getRawOffset()
Gets the offset for standard time from GMT for this SimpleTimeZone. |
int |
hashCode()
Returns an integer hash code for the receiver. |
boolean |
hasSameRules(TimeZone zone)
Returns if the specified TimeZone has the same raw offset and daylight savings time rules as this SimpleTimeZone. |
boolean |
inDaylightTime(Date time)
Returns if the specified Date is in the daylight savings time period for this SimpleTimeZone. |
void |
setDSTSavings(int milliseconds)
Sets the daylight savings offset in milliseconds for this SimpleTimeZone. |
void |
setEndRule(int month,
int dayOfMonth,
int time)
Sets the rule which specifies the end of daylight savings time. |
void |
setEndRule(int month,
int day,
int dayOfWeek,
int time)
Sets the rule which specifies the end of daylight savings time. |
void |
setEndRule(int month,
int day,
int dayOfWeek,
int time,
boolean after)
Sets the rule which specifies the end of daylight savings time. |
void |
setRawOffset(int offset)
Sets the offset for standard time from GMT for this SimpleTimeZone. |
void |
setStartRule(int month,
int dayOfMonth,
int time)
Sets the rule which specifies the start of daylight savings time. |
void |
setStartRule(int month,
int day,
int dayOfWeek,
int time)
Sets the rule which specifies the start of daylight savings time. |
void |
setStartRule(int month,
int day,
int dayOfWeek,
int time,
boolean after)
Sets the rule which specifies the start of daylight savings time. |
void |
setStartYear(int year)
Sets the starting year for daylight savings time in this SimpleTimeZone. |
String |
toString()
Returns the string representation of this SimpleTimeZone. |
boolean |
useDaylightTime()
Returns if this TimeZone has a daylight savings time period. |
| Methods inherited from class java.util.TimeZone |
|---|
getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getDisplayName, getID, getTimeZone, setDefault, setID |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UTC_TIME
public static final int STANDARD_TIME
public static final int WALL_TIME
| Constructor Detail |
|---|
public SimpleTimeZone(int offset,
String name)
offset - the offset from GMT of standard time in millisecondsname - the time zone ID
public SimpleTimeZone(int offset,
String name,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime)
offset - the offset from GMT of standard time in millisecondsname - the time zone IDstartMonth - the Calendar month in which daylight savings time startsstartDay - the occurrence of the day of the week on which daylight
savings time startsstartDayOfWeek - the Calendar day of the week on which daylight savings time
startsstartTime - the time of day in milliseconds on which daylight savings time
startsendMonth - the Calendar month in which daylight savings time endsendDay - the occurrence of the day of the week on which daylight
savings time endsendDayOfWeek - the Calendar day of the week on which daylight savings time
endsendTime - the time of day in milliseconds standard time on which
daylight savings time ends
public SimpleTimeZone(int offset,
String name,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime,
int daylightSavings)
offset - the offset from GMT of standard time in millisecondsname - the time zone IDstartMonth - the Calendar month in which daylight savings time startsstartDay - the occurrence of the day of the week on which daylight
savings time startsstartDayOfWeek - the Calendar day of the week on which daylight savings time
startsstartTime - the time of day in milliseconds on which daylight savings time
startsendMonth - the Calendar month in which daylight savings time endsendDay - the occurrence of the day of the week on which daylight
savings time endsendDayOfWeek - the Calendar day of the week on which daylight savings time
endsendTime - the time of day in milliseconds standard time on which
daylight savings time endsdaylightSavings - the daylight savings time difference in milliseconds
public SimpleTimeZone(int offset,
String name,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int startTimeMode,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime,
int endTimeMode,
int daylightSavings)
offset - the offset from GMT of standard time in millisecondsname - the time zone IDstartMonth - the Calendar month in which daylight savings time startsstartDay - the occurrence of the day of the week on which daylight
savings time startsstartDayOfWeek - the Calendar day of the week on which daylight savings time
startsstartTime - the time of day in milliseconds on which daylight savings time
startsstartTimeMode - the mode (UTC, standard, or wall time) of the start time valueendMonth - the Calendar month in which daylight savings time endsendDay - the occurrence of the day of the week on which daylight
savings time endsendDayOfWeek - the Calendar day of the week on which daylight savings time
endsendTime - the time of day in milliseconds standard time on which
daylight savings time endsendTimeMode - the mode (UTC, standard, or wall time) of the end time valuedaylightSavings - the daylight savings time difference in milliseconds| Method Detail |
|---|
public Object clone()
clone in class TimeZoneCloneablepublic boolean equals(Object object)
equals in class Objectobject - the object to compare with this object
hashCode()public int getDSTSavings()
getDSTSavings in class TimeZone
public int getOffset(int era,
int year,
int month,
int day,
int dayOfWeek,
int time)
getOffset in class TimeZoneera - the GregorianCalendar era, either GregorianCalendar.BC or
GregorianCalendar.ADyear - the yearmonth - the Calendar monthday - the day of the monthdayOfWeek - the Calendar day of the weektime - the time of day in milliseconds
public int getOffset(long time)
getOffset in class TimeZonetime - the date in milliseconds since January 1, 1970 00:00:00 GMT
public int getRawOffset()
getRawOffset in class TimeZonepublic int hashCode()
hashCode in class Objectequals(java.lang.Object)public boolean hasSameRules(TimeZone zone)
hasSameRules in class TimeZonezone - a TimeZone
public boolean inDaylightTime(Date time)
inDaylightTime in class TimeZonetime - a Date
public void setDSTSavings(int milliseconds)
milliseconds - the daylight savings offset in milliseconds
public void setEndRule(int month,
int dayOfMonth,
int time)
month - the Calendar month in which daylight savings time endsdayOfMonth - the Calendar day of the month on which daylight savings time
endstime - the time of day in milliseconds standard time on which
daylight savings time ends
public void setEndRule(int month,
int day,
int dayOfWeek,
int time)
month - the Calendar month in which daylight savings time endsday - the occurrence of the day of the week on which daylight
savings time endsdayOfWeek - the Calendar day of the week on which daylight savings time
endstime - the time of day in milliseconds standard time on which
daylight savings time ends
public void setEndRule(int month,
int day,
int dayOfWeek,
int time,
boolean after)
month - the Calendar month in which daylight savings time endsday - the Calendar day of the monthdayOfWeek - the Calendar day of the week on which daylight savings time
endstime - the time of day in milliseconds on which daylight savings time
endsafter - selects the day after or before the day of monthpublic void setRawOffset(int offset)
setRawOffset in class TimeZoneoffset - the offset from GMT of standard time in milliseconds
public void setStartRule(int month,
int dayOfMonth,
int time)
month - the Calendar month in which daylight savings time startsdayOfMonth - the Calendar day of the month on which daylight savings time
startstime - the time of day in milliseconds on which daylight savings time
starts
public void setStartRule(int month,
int day,
int dayOfWeek,
int time)
month - the Calendar month in which daylight savings time startsday - the occurrence of the day of the week on which daylight
savings time startsdayOfWeek - the Calendar day of the week on which daylight savings time
startstime - the time of day in milliseconds on which daylight savings time
starts
public void setStartRule(int month,
int day,
int dayOfWeek,
int time,
boolean after)
month - the Calendar month in which daylight savings time startsday - the Calendar day of the monthdayOfWeek - the Calendar day of the week on which daylight savings time
startstime - the time of day in milliseconds on which daylight savings time
startsafter - selects the day after or before the day of monthpublic void setStartYear(int year)
year - the starting yearpublic String toString()
toString in class Objectpublic boolean useDaylightTime()
useDaylightTime in class TimeZone
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||