- Java.util - WeakHashMap
- Java.util - Vector
- Java.util - UUID
- Java.util - TreeSet
- Java.util - TreeMap
- Java.util - TimeZone
- Java.util - TimerTask
- Java.util - Timer
- Java.util - StringTokenizer
- Java.util - Stack
- Java.util - SimpleTimeZone
- Java.util - ServiceLoader
- Java.util - Scanner
- Java.util - ResourceBundle.Control
- Java.util - ResourceBundle
- Java.util - Random
- Java.util - PropertyResourceBundle
- Java.util - PropertyPermission
- Java.util - Properties
- Java.util - PriorityQueue
- Java.util - Observable
- Java.util - Locale
- Java.util - ListResourceBundle
- Java.util - LinkedList
- Java.util - LinkedHashSet
- Java.util - LinkedHashMap
- Java.util - IdentityHashMap
- Java.util - Hashtable
- Java.util - HashSet
- Java.util - HashMap
- Java.util - GregorianCalendar
- Java.util - Formatter
- Java.util - EnumSet
- Java.util - EnumMap
- Java.util - Dictionary
- Java.util - Date
- Java.util - Currency
- Java.util - Collections
- Java.util - Calendar
- Java.util - BitSet
- Java.util - Arrays
- Java.util - ArrayList
- Java.util - ArrayDeque
- Java.util - Home
Java.util Package Extras
- Java.util - Discussion
- Java.util - Useful Resources
- Java.util - Enumerations
- Java.util - Exceptions
- Java.util - Interfaces
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Java.util.TimeZone Class
Introduction
The java.util.TimeZone class represents a time zone offset, and also figures out daypght savings.Following are the important points about TimeZone −
It takes into consideration various time zone.
Through the method used under this class a program running in any country, gets a TimeZone object based on that particular country s time zone.
Class declaration
Following is the declaration for java.util.TimeZone class −
pubpc abstract class TimeZone extends Object implements Seriapzable, Cloneable
Field
Following are the fields for java.util.TimeZone class −
static int LONG − This is the style specifier for getDisplayName() indicating a long name, such as "Pacific Standard Time."
static int SHORT − This is the style specifier for getDisplayName() indicating a short name, such as "Pacific.Standard Time".
Class constructors
Sr.No. | Constructor & Description |
---|---|
1 | TimeZone() This constructor is the single constructor for invocation by subclass constructors. |
Class methods
Sr.No. | Method & Description |
---|---|
1 | This method creates a copy of this TimeZon |
2 | This method gets all the available IDs supported. |
3 | This method gets the available IDs according to the given time zone offset in milpseconds. |
4 | This method gets the default TimeZone for this host. |
5 | This method returns a name of this time zone suitable for presentation to the user in the default locale. |
6 | This method returns a name of this time zone suitable for presentation to the user in the default locale. |
7 | This method returns a name of this time zone suitable for presentation to the user in the specified locale. |
8 | This method returns a name of this time zone suitable for presentation to the user in the specified locale. |
9 | This method returns the amount of time to be added to local standard time to get local wall clock time. |
10 | This method gets the ID of this time zone |
11 | This method gets the time zone offset, for current date, modified in case of daypght savings. |
12 | This method returns the offset of this time zone from UTC at the specified date. |
13 | This method returns the amount of time in milpseconds to add to UTC to get standard time in this time zone. |
14 | This method gets the TimeZone for the given ID. |
15 | This method returns true if this zone has the same rule and offset as another zone. |
16 | This method queries if the given date is in daypght savings time in this time zone. |
17 | This method sets the TimeZone that is returned by the getDefault method. |
18 | This method sets the time zone ID |
19 | This method sets the base time zone offset to GMT. |
20 | This method queries if this time zone uses daypght savings time. |
Methods inherited
This class inherits methods from the following classes −
java.util.Object