WBEMTime class

[The WBEMTime class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]

The WBEMTime class facilitates conversions between various Windows and ANSI C run-time time formats. For more information, see also WBEMTimeSpan Class Methods.

Members

The WBEMTime class has these types of members:

Constructors

The WBEMTime class has these constructors.

Constructor Description
WBEMTime Constructor that facilitates conversions between various Windows and ANSI C run-time time formats.

Methods

The WBEMTime class has these methods.

Method Description
Clear Sets the time in the WBEMTime object to an invalid time.
GetBSTR Presents the time as a BSTR value.
GetDMTF Gets the time as a BSTR value in CIM datetime format.
GetDMTFNonNtfs Gets a DMTF date that is based upon a FAT or a Date and Time Format where the UTC is not known.
GetFILETIME Gets the time as an MFC FILETIME structure.
GetLocalOffsetForDate Overloaded. Returns the offset in minutes(+ or -) between GMT and local time for the time supplied in the argument.
GetStructtm Gets the time as an ANSI C run-time struct tm structure.
GetSYSTEMTIME Gets the time as an MFC SYSTEMTIME structure.
GetTime Gets the time as a 64-bit integer.
Gettime_t Gets the time as an ANSI C run-time time_t variable.
IsOk Indicates whether the WBEMTime object represents a valid time.
SetDMTF Sets the time in the WBEMTime object in CIM datetime format.

WBEMTime overloaded operators

The WBEMTime object defines the following overloaded operators.

WBEMTime overloaded operators Description
operator = Assignment operator facilitates conversions between various Windows and ANSI C run-time time formats.
operator + Addition operator increments an object's time by a time span. The result is returned in a new WBEMTime object.
operator += Add-and-assign operator increments an object's time by a time span.
operator - Subtraction operator decrements an object's time by another object's time. The result is returned in a new WBEMTime object.
operator -= Subtract-and-assign operator decrements an object's time by a time span.
operator ==operator !=
operator >
operator >=
operator <
operator <=
Comparison operators compare two WBEMTime objects.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
WbemTime.h
DLL
FrameDynOS.dll;
FrameDyn.dll