|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Calendar
java.util.GregorianCalendar
org.mbari.util.GmtCalendar
GmtCalendar is a useful class for working with times that are based using GMT time. For example, if a data loger collects info and returns it as GMT using GregorianCalendar is a pain because it will assumes that user supplied times are from the default TimeZone. This will cause an ofset in the time of each data sample. To avoid this GmtCalendar uses the GMT as it's default TimeZone. Note that it will return time in milliseconds UTC but any dates produced by using DateFormat will give the sample time based on the local time.
| Field Summary |
| Fields inherited from class java.util.GregorianCalendar |
AD, BC |
| Fields inherited from class java.util.Calendar |
AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET |
| Constructor Summary | |
GmtCalendar(java.util.Date date)
Constructor for the GmtCalendar object |
|
GmtCalendar(int year,
int month,
int date)
Constructs a GmtCalendar with the given date set in the GMT time zone with the default locale. |
|
GmtCalendar(int year,
int month,
int date,
int hour,
int minute)
Constructs a GregorianCalendar with the given date and time set for the GMT time zone with the default locale. |
|
GmtCalendar(int year,
int month,
int date,
int hour,
int minute,
int second)
Constructs a GregorianCalendar with the given date and time set for the GMT time zone with the default locale. |
|
GmtCalendar(long millisec)
Constructor for the GmtCalendar object |
|
| Methods inherited from class java.util.GregorianCalendar |
add, computeFields, computeTime, equals, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, hashCode, isLeapYear, roll, roll, setGregorianChange |
| Methods inherited from class java.util.Calendar |
after, before, clear, clear, clone, complete, get, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, getTimeZone, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GmtCalendar(int year,
int month,
int date)
year - the value used to set the YEAR time field in the calendar.month - the value used to set the MONTH time field in the calendar.
Month value is 0-based. e.g., 0 for January.date - the value used to set the DATE time field in the calendar.
public GmtCalendar(int year,
int month,
int date,
int hour,
int minute)
year - the value used to set the YEAR time field in the calendar.month - the value used to set the MONTH time field in the calendar.
Month value is 0-based. e.g., 0 for January.date - the value used to set the DATE time field in the calendar.hour - the value used to set the HOUR_OF_DAY time field in the
calendar.minute - the value used to set the MINUTE time field in the
calendar.
public GmtCalendar(int year,
int month,
int date,
int hour,
int minute,
int second)
year - the value used to set the YEAR time field in the calendar.month - the value used to set the MONTH time field in the calendar.
Month value is 0-based. e.g., 0 for January.date - the value used to set the DATE time field in the calendar.hour - the value used to set the HOUR_OF_DAY time field in the
calendar.minute - the value used to set the MINUTE time field in the
calendar.second - the value used to set the SECOND time field in the
calendar.public GmtCalendar(java.util.Date date)
date - Description of the Parameterpublic GmtCalendar(long millisec)
millisec - Description of the Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||