- Java.util - Home
- Java.util - ArrayDeque
- Java.util - ArrayList
- Java.util - Arrays
- Java.util - BitSet
- Java.util - Calendar
- Java.util - Collections
- Java.util - Currency
- Java.util - Date
- Java.util - Dictionary
- Java.util - EnumMap
- Java.util - EnumSet
- Java.util - Formatter
- Java.util - GregorianCalendar
- Java.util - HashMap
- Java.util - HashSet
- Java.util - Hashtable
- Java.util - IdentityHashMap
- Java.util - LinkedHashMap
- Java.util - LinkedHashSet
- Java.util - LinkedList
- Java.util - ListResourceBundle
- Java.util - Locale
- Java.util - Observable
- Java.util - PriorityQueue
- Java.util - Properties
- Java.util - PropertyPermission
- Java.util - PropertyResourceBundle
- Java.util - Random
- Java.util - ResourceBundle
- Java.util - ResourceBundle.Control
- Java.util - Scanner
- Java.util - ServiceLoader
- Java.util - SimpleTimeZone
- Java.util - Stack
- Java.util - StringTokenizer
- Java.util - Timer
- Java.util - TimerTask
- Java.util - TimeZone
- Java.util - TreeMap
- Java.util - TreeSet
- Java.util - UUID
- Java.util - Vector
- Java.util - WeakHashMap
- Java.util - Interfaces
- Java.util - Exceptions
- Java.util - Enumerations
- Java.util Useful Resources
- Java.util - Useful Resources
- Java.util - Discussion
Java SimpleTimeZone Class
Introduction
The Java SimpleTimeZone class is a concrete subclass of TimeZone that represents a time zone for use with a Gregorian calendar. Following are the important points about SimpleTimeZone −
The class holds an offset from GMT, called raw offset.
This class also holds start and end rules for a daylight saving time schedule.
Class declaration
Following is the declaration for java.util.SimpleTimeZone class −
public class SimpleTimeZone extends TimeZone
Field
Following are the fields for java.util.SimpleTimeZone class −
static int STANDARD_TIME − This is the constant for a mode of start or end time specified as standard time.
static int UTC_TIME − This is the constant for a mode of start or end time specified as UTC.
static int WALL_TIME − This is the constant for a mode of start or end time specified as wall clock time.
It also consists of fields inherited from class TimeZone.
Class constructors
| Sr.No. | Constructor & Description |
|---|---|
| 1 | SimpleTimeZone(int rawOffset, String ID) This constructs a SimpleTimeZone with the given base time zone offset from GMT and time zone ID with no daylight saving time schedule. |
| 2 | SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime) This constructs a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, and rules for starting and ending the daylight time. |
| 3 | SimpleTimeZone(int rawOffset, String ID, int startMonth, int startDay, int startDayOfWeek, int startTime, int endMonth, int endDay, int endDayOfWeek, int endTime, int dstSavings) This constructs a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, and rules for starting and ending the daylight time. |
| 4 | 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) This constructs a SimpleTimeZone with the given base time zone offset from GMT, time zone ID, and rules for starting and ending the daylight time. |
Class methods
| Sr.No. | Method & Description |
|---|---|
| 1 | Object clone()
This method returns a clone of this SimpleTimeZone instance. |
| 2 |