The CIMDateTime class represents the CIM datetime data type as a C++ class
CIMDateTime. A CIM datetime may contain a time stamp or an interval.
CIMDateTime is an intrinsic CIM data type that represents the time as a
string with a fixed length.
A time stamp has the following form:
yyyymmddhhmmss.mmmmmmsutc
Where
yyyy = year (1-9999)
mm = month (1-12)
dd = day (1-31)
hh = hour (0-23)
mm = minute (0-59)
ss = second (0-59)
mmmmmm = microseconds
s = '+' or '-' to represent the Coordinated Universal Time (UTC) sign
utc = offset from Coordinated Universal Time (UTC)
(same as Greenwich Mean Time(GMT) offset)
An interval has the following form:
ddddddddhhmmss.mmmmmm:000
Where
dddddddd = days
hh = hours (0-23)
mm = minutes (0-59)
ss = seconds (0-59)
mmmmmm = microseconds
Note: Intervals always end in ":000". This distinguishes intervals from
time stamps.
CIMDateTime objects are constructed from String objects or from
other CIMDateTime objects. Character strings must be exactly
twenty-five characters in length and conform to either the time stamp
or interval format.
CIMDateTime objects that are not explicitly initialized will be
implicitly initialized with a zero time interval:
00000000000000.000000:000
The following table shows what arithmetic operations are allowed
between CIMDateTime types. The entries in the last four columns define
the type of the result when the operation, specified in the column header,
is performed on operands, of the types specified in the first two columns.
LHS - left hand side TS - time stamp int - integer
RHS - right hand side IV - interval
X - operation not allowed between types
LHS RHS + - * /
_____________________________________________
TS TS X IV X X
TS IV TS TS X X
TS int X X X X
IV IV IV IV X int
IV TS X X X X
IV int X X IV IV
int TS X X X X
int IV X X X X
The relational operators may only operate on two operands of the same type,
i.e. two time stamps or two intervals.