java.lang.Object
java.util.TimeZone
java.util.SimpleTimeZone
- All Implemented Interfaces:
- Serializable, Cloneable
- See Also:
- Top Examples, Source Code,
UTC_TIME
, STANDARD_TIME
, WALL_TIME
, OCTOBER
, WEDNESDAY
, APRIL
, SUNDAY
, DAY_OF_WEEK
, Calendar.MARCH
, MONTH
, setStartYear
,
GregorianCalendar
public Object clone()
- See Also:
Cloneable
, TimeZone
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean equals(Object obj)
- See Also:
Hashtable
, Object.hashCode()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int getDSTSavings()
- See Also:
setDSTSavings(int)
, TimeZone
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int getOffset(int era,
int year,
int month,
int day,
int dayOfWeek,
int millis)
- See Also:
Calendar.DST_OFFSET
, Calendar.ZONE_OFFSET
, IllegalArgumentException, TimeZone, GregorianCalendar
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int getOffset(long date)
- See Also:
Calendar.DST_OFFSET
, Calendar.ZONE_OFFSET
, TimeZone
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int getRawOffset()
- See Also:
setRawOffset(int)
, TimeZone
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int hashCode()
- See Also:
Hashtable
, Object.equals(java.lang.Object)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean hasSameRules(TimeZone other)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean inDaylightTime(Date date)
- See Also:
- TimeZone
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setDSTSavings(int millisSavedDuringDST)
- See Also:
getDSTSavings()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setEndRule(int endMonth,
int endDay,
int endTime)
- See Also:
- IllegalArgumentException,
MONTH
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setEndRule(int endMonth,
int endDay,
int endDayOfWeek,
int endTime)
- See Also:
- IllegalArgumentException,
MONTH
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setEndRule(int endMonth,
int endDay,
int endDayOfWeek,
int endTime,
boolean after)
- See Also:
- IllegalArgumentException,
MONTH
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setRawOffset(int offsetMillis)
- See Also:
getRawOffset()
, TimeZone
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setStartRule(int startMonth,
int startDay,
int startTime)
- See Also:
- IllegalArgumentException,
MONTH
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[860]Set up rules for daylight savings time
By Anonymous on 2004/08/18 14:46:37 Rate
// get the supported ids for GMT-08:00 ( Pacific Standard Time )
String [ ] ids = TimeZone.getAvailableIDs ( -8 * 60 * 60 * 1000 ) ;
// if no ids were returned, something is wrong. get out.
if ( ids.length == 0 )
System.exit ( 0 ) ;
// begin output
System.out.println ( "Current Time" ) ;
// create a Pacific Standard Time time zone
SimpleTimeZone pdt = new SimpleTimeZone ( -8 * 60 * 60 * 1000, ids [ 0 ] ) ;
// set up rules for daylight savings time
pdt.setStartRule ( Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000 ) ;
pdt.setEndRule ( Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000 ) ;
public void setStartRule(int startMonth,
int startDay,
int startDayOfWeek,
int startTime)
- See Also:
- IllegalArgumentException,
MONTH
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setStartRule(int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
boolean after)
- See Also:
- IllegalArgumentException,
MONTH
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void setStartYear(int year)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public SimpleTimeZone(int rawOffset,
String ID)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public SimpleTimeZone(int rawOffset,
String ID,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime)
- See Also:
- IllegalArgumentException,
MONTH
, WALL_TIME
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public SimpleTimeZone(int rawOffset,
String ID,
int startMonth,
int startDay,
int startDayOfWeek,
int startTime,
int endMonth,
int endDay,
int endDayOfWeek,
int endTime,
int dstSavings)
- See Also:
- IllegalArgumentException,
MONTH
, WALL_TIME
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
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)
- See Also:
UTC_TIME
, STANDARD_TIME
, WALL_TIME
, IllegalArgumentException, MONTH
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int STANDARD_TIME
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String toString()
- See Also:
- Object
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public boolean useDaylightTime()
- See Also:
- TimeZone
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int UTC_TIME
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public static final int WALL_TIME
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples