TimeHelpers Class

 

Provides methods to help you work with time. Configuration Manager uses several different types of time internally. This class encapsulates many of them.

Supported time formats include: ISO 8601, CIM time (also called SMS time in the some of the methods and properties in this class), FILETIME, SystemTime, "SMS Cookie" time, and CTime/time_t/UNIX time. Conversion to and from these formats is supported in most cases.

Namespace:   Microsoft.ConfigurationManagement.Messaging.Framework
Assembly:  Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)

System::Object
  Microsoft.ConfigurationManagement.Messaging.Framework::TimeHelpers

[SerializableAttribute]
[ExtensionAttribute]
public ref class TimeHelpers abstract sealed 

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticCurrentDateTimeAsSmsTime

Generates a DateTime object as a CIM-formatted string.

System_CAPS_pubpropertySystem_CAPS_staticCurrentTimeAsIso8601

Gets the current time in ISO 8601 format.

System_CAPS_pubpropertySystem_CAPS_staticCurrentTimeAsUnixTime

Gets the current time as Unix ctime.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticParseCTime(Int64)

Converts time from a CTime object to a DateTime object.

System_CAPS_pubmethodSystem_CAPS_staticParseIso8601Time(String^)

Converts time from the string date format to a DateTime object.

System_CAPS_pubmethodSystem_CAPS_staticParseIso8601Time(String^, Boolean)

Converts time from the string date format to DateTime.

System_CAPS_pubmethodSystem_CAPS_staticParseSmsCookieTime(String^)

Converts time from cookie time format to a DateTime object.

System_CAPS_pubmethodSystem_CAPS_staticParseSmsTime(String^)

Converts time from string CIM_DATETIME format to a DateTime object.

System_CAPS_pubmethodSystem_CAPS_staticToComFileTime(DateTime)

Converts a DateTime object as local time to a COM FILETIME object. For UTC conversion, use ToComFileTime(DateTime, Boolean).

System_CAPS_pubmethodSystem_CAPS_staticToComFileTime(DateTime, Boolean)

Converts a DateTime object to a COM FILETIME object.

System_CAPS_pubmethodSystem_CAPS_staticToCTime(DateTime)

Converts a DateTime object to Unix ctime.

System_CAPS_pubmethodSystem_CAPS_staticToCTime(DateTime, Boolean)

Converts a DateTime object to Unix ctime.

System_CAPS_pubmethodSystem_CAPS_staticToCTime(Nullable<DateTime>)

Converts a DateTime object to Unix ctime.

System_CAPS_pubmethodSystem_CAPS_staticToCTime(Nullable<DateTime>, Boolean)

Converts a DateTime object to Unix ctime.

System_CAPS_pubmethodSystem_CAPS_staticToDateTime(FILETIME)

Converts a FILETIME object represented as local time to a managed DateTime object. For UTC conversion, use ToDateTime(FILETIME, Boolean).

System_CAPS_pubmethodSystem_CAPS_staticToDateTime(FILETIME, Boolean)

Converts a FILETIME object to a managed DateTime object.

System_CAPS_pubmethodSystem_CAPS_staticToIso8601Time(DateTime)

Converts an existing DateTime object to ISO 8601 format.

System_CAPS_pubmethodSystem_CAPS_staticToSmsCookieTime(DateTime)

Converts an existing DateTime object to the SMS cookie time format: 2007-01-01 11:11:11.000.

System_CAPS_pubmethodSystem_CAPS_staticToSmsTime(DateTime)

Converts a DateTime object to an SMS-formatted string.

System_CAPS_pubmethodSystem_CAPS_staticToSmsTime(DateTime, Boolean)

Converts a DateTime object to a CIM-formatted string.

System_CAPS_pubmethodSystem_CAPS_staticToSmsTime(DateTime, Int32)

Converts a DateTime object to a CIM-formatted string. Override with a specific offset.

System_CAPS_pubmethodSystem_CAPS_staticToSmsTime(DateTime, SmsTimeZone)

Converts a DateTime object to a CIM-formatted string.

System_CAPS_pubmethodSystem_CAPS_staticToSmsTime(DateTime, SmsTimeZone, Boolean, Int32)

Formats CIM time to a string. For example: '20070402184502.000000-420'.

System_CAPS_pubmethodSystem_CAPS_staticToSystemTime(DateTime)

Converts a DateTime object to a SystemTime representation.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticEpoch

Unix ctime epoch DateTime.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: