Package org.apache.commons.lang3.time
Class GmtTimeZone
java.lang.Object
java.util.TimeZone
org.apache.commons.lang3.time.GmtTimeZone
- All Implemented Interfaces:
Serializable,Cloneable
Custom time zone that contains offset from GMT.
- Since:
- 3.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate final int(package private) static final longprivate final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetID()intgetOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) intinthashCode()booleaninDaylightTime(Date date) voidsetRawOffset(int offsetMillis) Sets no raw offset and always throwsUnsupportedOperationException.toString()private static StringBuildertwoDigits(StringBuilder sb, int n) booleanMethods inherited from class java.util.TimeZone
clone, getAvailableIDs, getAvailableIDs, getDefault, getDisplayName, getDisplayName, getDisplayName, getDisplayName, getDSTSavings, getOffset, getTimeZone, getTimeZone, hasSameRules, observesDaylightTime, setDefault, setID, toZoneId
-
Field Details
-
MILLISECONDS_PER_MINUTE
private static final int MILLISECONDS_PER_MINUTE- See Also:
-
MINUTES_PER_HOUR
private static final int MINUTES_PER_HOUR- See Also:
-
HOURS_PER_DAY
private static final int HOURS_PER_DAY- See Also:
-
serialVersionUID
static final long serialVersionUID- See Also:
-
offset
private final int offset -
zoneId
-
-
Constructor Details
-
GmtTimeZone
GmtTimeZone(boolean negate, int hours, int minutes)
-
-
Method Details
-
twoDigits
-
equals
-
getID
-
getOffset
public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) -
getRawOffset
public int getRawOffset()- Specified by:
getRawOffsetin classTimeZone
-
hashCode
public int hashCode() -
inDaylightTime
- Specified by:
inDaylightTimein classTimeZone
-
setRawOffset
public void setRawOffset(int offsetMillis) Sets no raw offset and always throwsUnsupportedOperationException.- Specified by:
setRawOffsetin classTimeZone
-
toString
-
useDaylightTime
public boolean useDaylightTime()- Specified by:
useDaylightTimein classTimeZone
-