Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
Inheritance Hierarchy
System.Object
Microsoft.ConfigurationManagement.Messaging.Framework.TimeHelpers
Syntax
[SerializableAttribute]
public static class TimeHelpers
[SerializableAttribute]
[ExtensionAttribute]
public ref class TimeHelpers abstract sealed
<SerializableAttribute>
<ExtensionAttribute>
Public NotInheritable Class TimeHelpers
Properties
Name | Description | |
---|---|---|
![]() ![]() |
CurrentDateTimeAsSmsTime | Generates a DateTime object as a CIM-formatted string. |
![]() ![]() |
CurrentTimeAsIso8601 | Gets the current time in ISO 8601 format. |
![]() ![]() |
CurrentTimeAsUnixTime | Gets the current time as Unix ctime. |
Methods
Name | Description | |
---|---|---|
![]() ![]() |
ParseCTime(Int64) | Converts time from a CTime object to a DateTime object. |
![]() ![]() |
ParseIso8601Time(String) | Converts time from the string date format to a DateTime object. |
![]() ![]() |
ParseIso8601Time(String, Boolean) | Converts time from the string date format to DateTime. |
![]() ![]() |
ParseSmsCookieTime(String) | Converts time from cookie time format to a DateTime object. |
![]() ![]() |
ParseSmsTime(String) | Converts time from string CIM_DATETIME format to a DateTime object. |
![]() ![]() |
ToComFileTime(DateTime) | Converts a DateTime object as local time to a COM FILETIME object. For UTC conversion, use ToComFileTime(DateTime, Boolean). |
![]() ![]() |
ToComFileTime(DateTime, Boolean) | |
![]() ![]() |
ToCTime(DateTime) | Converts a DateTime object to Unix ctime. |
![]() ![]() |
ToCTime(DateTime, Boolean) | Converts a DateTime object to Unix ctime. |
![]() ![]() |
ToCTime(Nullable<DateTime>) | Converts a DateTime object to Unix ctime. |
![]() ![]() |
ToCTime(Nullable<DateTime>, Boolean) | Converts a DateTime object to Unix ctime. |
![]() ![]() |
ToDateTime(FILETIME) | Converts a FILETIME object represented as local time to a managed DateTime object. For UTC conversion, use ToDateTime(FILETIME, Boolean). |
![]() ![]() |
ToDateTime(FILETIME, Boolean) | |
![]() ![]() |
ToIso8601Time(DateTime) | Converts an existing DateTime object to ISO 8601 format. |
![]() ![]() |
ToSmsCookieTime(DateTime) | Converts an existing DateTime object to the SMS cookie time format: 2007-01-01 11:11:11.000. |
![]() ![]() |
ToSmsTime(DateTime) | Converts a DateTime object to an SMS-formatted string. |
![]() ![]() |
ToSmsTime(DateTime, Boolean) | Converts a DateTime object to a CIM-formatted string. |
![]() ![]() |
ToSmsTime(DateTime, Int32) | Converts a DateTime object to a CIM-formatted string. Override with a specific offset. |
![]() ![]() |
ToSmsTime(DateTime, SmsTimeZone) | Converts a DateTime object to a CIM-formatted string. |
![]() ![]() |
ToSmsTime(DateTime, SmsTimeZone, Boolean, Int32) | Formats CIM time to a string. For example: '20070402184502.000000-420'. |
![]() ![]() |
ToSystemTime(DateTime) | Converts a DateTime object to a SystemTime representation. |
Fields
Name | Description | |
---|---|---|
![]() ![]() |
Epoch | Unix ctime epoch DateTime. |
Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.ConfigurationManagement.Messaging.Framework Namespace
Return to top