Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Programming with Java Concept: Java TimeZone Class
1. Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
1
2. Prepared By: Asst. Prof. Sejal Jadav
Units
CS – 19 : Programming with Java
Concept: Java TimeZone Class
B.C.A & B.SC.(IT) – 4
3. Prepared By: Asst. Prof. Sejal Jadav
Q: Java TimeZone Class
• The java.util.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.
4. Prepared By: Asst. Prof. Sejal Jadav
Class declaration:
public class SimpleTimeZone extends TimeZone
5. Prepared By: Asst. Prof. Sejal Jadav
Class constructors:
• 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)
• ->rawOffset - the given time zone GMT offset in milliseconds.
6. Prepared By: Asst. Prof. Sejal Jadav
• 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.
7. Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
8. Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
9. Prepared By: Asst. Prof. Sejal Jadav
• Examples: folder:SimpleTimeZone
SimpleTimeZoneDemo.java
to
SimpleTimeZoneDemo9.java
10. Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
Prepared By: Asst. Prof. Sejal Jadav
10