Package com.tailf.conf
Class ConfDatetime
Object
com.tailf.conf.ConfObject
com.tailf.conf.ConfValue
com.tailf.conf.ConfDatetime
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<ConfDatetime>
public class ConfDatetime
extends ConfValue
implements Cloneable, Serializable, Comparable<ConfDatetime>
DATA_CONTAINER - Corresponds to the YANG date-and-time type.
- See Also:
-
Field Summary
Fields inherited from class com.tailf.conf.ConfObject
J_BINARY, J_BIT32, J_BIT64, J_BITBIG, J_BOOL, J_BUF, J_CDBBEGIN, J_DATE, J_DATETIME, J_DECIMAL64, J_DEFAULT, J_DOUBLE, J_DQUAD, J_DURATION, J_ENUMERATION, J_HEXSTR, J_IDENTITYREF, J_INSTANCE_IDENTIFIER, J_INT16, J_INT32, J_INT64, J_INT8, J_IPV4, J_IPV4_AND_PLEN, J_IPV4PREFIX, J_IPV6, J_IPV6_AND_PLEN, J_IPV6PREFIX, J_LIST, J_NOEXISTS, J_OBJECTREF, J_OID, J_PTR, J_QNAME, J_STR, J_SYMBOL, J_TIME, J_UINT16, J_UINT32, J_UINT64, J_UINT8, J_UNION, J_XMLBEGIN, J_XMLBEGINDEL, J_XMLEND, J_XMLMOVEAFTER, J_XMLMOVEFIRST, J_XMLTAG
-
Constructor Summary
ConstructorDescriptionDeprecated.ConfDatetime
(int year, int month, int day, int hour, int min, int sec, int micro, int timezone, int timezone_minutes) For internal usage.ConfDatetime
(String str) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
after
(ConfDatetime time) Deprecated.boolean
before
(ConfDatetime time) Deprecated.int
Deprecated.encode()
encode value.boolean
Determine if two ConfValue are equal.Deprecated.static ConfDatetime
int
getDay()
int
getHour()
int
getMicro()
int
getMin()
int
getMonth()
int
getSec()
int
int
int
getYear()
int
hashCode()
boolean
toString()
Methods inherited from class com.tailf.conf.ConfValue
getStringByValue, getStringByValue, getValueByString, getValueByString
Methods inherited from class com.tailf.conf.ConfObject
clone, decode
-
Constructor Details
-
ConfDatetime
For internal usage.- Throws:
ConfException
-
ConfDatetime
public ConfDatetime(int year, int month, int day, int hour, int min, int sec, int micro, int timezone, int timezone_minutes) - Parameters:
year
- -month
- - month from 1 to 12day
- -hour
- -min
- -sec
- -micro
-timezone
- - Timezone Hour in unit hourstimezone_minutes
- - Timezone Minutes in unit minutes
-
ConfDatetime
-
ConfDatetime
Deprecated.Do not use this constructor. It does not handle DST correctly -
ConfDatetime
Deprecated.Do not use this constructor. It does not handle DST correctly- Parameters:
cal
-
-
-
Method Details
-
getConfDatetime
- Returns:
- Returns the current time in UTC TimeZone.
-
getYear
public int getYear() -
getMonth
public int getMonth() -
getDay
public int getDay() -
getHour
public int getHour() -
getMin
public int getMin() -
getSec
public int getSec() -
getMicro
public int getMicro() -
getTimezone
public int getTimezone()- Returns:
- The Hour timezone in hours, for example 02:00 will return 2 hours
-
isTimezoneSet
public boolean isTimezoneSet() -
getTimezoneMinutes
public int getTimezoneMinutes()- Returns:
- The Minutes timezone in minutes, for example 02:30 will return 30 minutes
-
getCalendar
Deprecated.Do not use this method. It does not handle DST correctly -
before
Deprecated.Do not use this method. It does not handle DST correctly For comparison of ConfDatetime object. -
after
Deprecated.Do not use this method. It does not handle DST correctly For comparison of ConfDatetime object. -
equals
Description copied from class:ConfValue
Determine if two ConfValue are equal. In general, ConfObjects are equal if the components they consist of are equal. -
hashCode
public int hashCode() -
toString
-
encode
Description copied from class:ConfValue
encode value. -
compareTo
Deprecated.Do not use this method. It does not handle DST correctly- Specified by:
compareTo
in interfaceComparable<ConfDatetime>
-