javax.cim
Class CIMDateTime
java.lang.Object
javax.cim.CIMDateTime
- All Implemented Interfaces:
- Serializable, Comparable<CIMDateTime>
- Direct Known Subclasses:
- CIMDateTimeAbsolute, CIMDateTimeInterval
public abstract class CIMDateTime
- extends Object
- implements Serializable, Comparable<CIMDateTime>
The CIMDateTime
class is modeled on the datetime data type as
specified in the CIM specification.
It is in the format: yyyyMMddHHmmss.SSSSSSsutc where:
- yyyy - is a 4 digit year
- MM - is the month
- dd - is the day of the month
- HH - is the hour (24 hour clock)
- mm - is the minute
- ss - is the second
- mmmmmm - is the number of microseconds
- s - is "+" or "-", indicating the sign of the UTC (Universal Coordinated
Time; for all intents and purposes the sane as Greenwich Mean Time)
correction field, or a ":". In the case of a ":" the value is interpreted as
a time interval, and yyyyMM are interpreted as days.
- utc - is the offset from UTC in minutes (using the sign indicated by s).
It is ignored for a time interval. For example Monday, May 25, 1998, at 1:30
PM EST would be represented as: 19980525133015.000000-300 Values must be
zero-padded so that the entire string is always the same 25-character length.
Fields which are not significant must be replaced with asterisk characters.
Similarly, intervals use the same format, except that the interpretation of
the field is based on elapsed time.
For example, an elapsed time of 1 day, 13 hours, 23 minutes, 12 seconds would
be: 00000001132312.000000:000 A UTC offset of zero is always used for
interval properties.
- See Also:
- Serialized Form
CIMDateTime
public CIMDateTime(String dateString)
throws IllegalArgumentException
- Creates a
CIMDateTime
object using a string.
- Parameters:
dateString
- - A string in the format of yyyyMMddHHmmss.SSSSSSsutc
- Throws:
IllegalArgumentException
- - If string is not in the correct format.
CIMDateTime
protected CIMDateTime()
equals
public boolean equals(Object pObj)
- Overrides:
equals
in class Object
- See Also:
Object.equals(java.lang.Object)
getDateTimeString
public abstract String getDateTimeString()
- Gets the internal string representation of this object.
- Returns:
- The internal representation of the
CIMDateTime
object.
hashCode
public abstract int hashCode()
- Returns the hashcode for this object.
- Overrides:
hashCode
in class Object
- Returns:
- The hashcode for this object.
- See Also:
Object.hashCode()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.