public class SimpleTimeZone extends TimeZone
Modifier and Type | Field and Description |
---|---|
static int |
STANDARD_TIME |
static int |
UTC_TIME |
static int |
WALL_TIME |
Constructor and Description |
---|
SimpleTimeZone(int rawOffset,
String ID) |
SimpleTimeZone(int rawOffset,
String ID,
int startMonth,
int startDayOfWeekInMonth,
int startDayOfWeek,
int startTime,
int endMonth,
int endDayOfWeekInMonth,
int endDayOfWeek,
int endTime) |
SimpleTimeZone(int rawOffset,
String ID,
int startMonth,
int startDayOfWeekInMonth,
int startDayOfWeek,
int startTime,
int endMonth,
int endDayOfWeekInMonth,
int endDayOfWeek,
int endTime,
int dstSavings) |
SimpleTimeZone(int rawOffset,
String ID,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int startTimeMode,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime,
int endTimeMode,
int dstSavings) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Default clone() method performs a "shallow" cloning of the instance.
|
boolean |
equals(Object o)
Default object equality (is identity).
|
int |
getDSTSavings() |
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 |
getRawOffset() |
int |
hashCode()
The (default) object hashcode: for transient objects this is simply the
address of the instance in memory, for persistent objects it is the
address at which the instance was first created (maybe in a previous
activation of the VM).
|
boolean |
hasSameRules(TimeZone other) |
boolean |
inDaylightTime(Date date) |
void |
setDSTSavings(int dst) |
void |
setEndRule(int month,
int dayOfM,
int time) |
void |
setEndRule(int month,
int dayOfWInM,
int dayOfW,
int time) |
void |
setEndRule(int month,
int dayOfM,
int dayOfW,
int time,
boolean after) |
void |
setRawOffset(int offsetMillis) |
void |
setStartRule(int month,
int dayOfM,
int time) |
void |
setStartRule(int month,
int dayOfWInM,
int dayOfW,
int time) |
void |
setStartRule(int month,
int dayOfM,
int dayOfW,
int time,
boolean after) |
void |
setStartYear(int startYear) |
String |
toString()
Default String representation: overriden by many classes.
|
boolean |
useDaylightTime() |
getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getDisplayName, getID, getOffset, getTimeZone, setDefault, setID
public static final int WALL_TIME
public static final int STANDARD_TIME
public static final int UTC_TIME
public SimpleTimeZone(int rawOffset, String ID)
public SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDayOfWeekInMonth, int startDayOfWeek, int startTime, int endMonth, int endDayOfWeekInMonth, int endDayOfWeek, int endTime)
public SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDayOfWeekInMonth, int startDayOfWeek, int startTime, int endMonth, int endDayOfWeekInMonth, int endDayOfWeek, int endTime, int dstSavings)
public SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int startTimeMode, int endMonth, int endDay, int endDayOfWeek, int endTime, int endTimeMode, int dstSavings)
public int getRawOffset()
getRawOffset
in class TimeZone
public void setRawOffset(int offsetMillis)
setRawOffset
in class TimeZone
public boolean useDaylightTime()
useDaylightTime
in class TimeZone
public void setStartYear(int startYear)
public int getDSTSavings()
getDSTSavings
in class TimeZone
public void setDSTSavings(int dst)
public void setEndRule(int month, int dayOfWInM, int dayOfW, int time)
public void setEndRule(int month, int dayOfM, int time)
public void setEndRule(int month, int dayOfM, int dayOfW, int time, boolean after)
public void setStartRule(int month, int dayOfWInM, int dayOfW, int time)
public void setStartRule(int month, int dayOfM, int time)
public void setStartRule(int month, int dayOfM, int dayOfW, int time, boolean after)
public String toString()
Object
public Object clone()
Object
public boolean equals(Object o)
Object
public boolean hasSameRules(TimeZone other)
hasSameRules
in class TimeZone
public boolean inDaylightTime(Date date)
inDaylightTime
in class TimeZone
public int hashCode()
Object
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int time)
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1995-2008 International Business Machines Corporation and others
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.
getOffset
in class TimeZone
era
- 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