Class Iso8601Timestamp
Utility class to assist with ISO-8601 timestamp conversions.
Inheritance
System.Object
Iso8601Timestamp
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Iso8601Timestamp : object
Properties
UtcNow
Gets the current UTC time in ISO-8601 format.
Declaration
public static string UtcNow { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
DateTimeToIso8601(DateTime)
Converts a date to a ISO-8601 timestamp.
Declaration
public static string DateTimeToIso8601(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | dateTime | The date to convert. |
Returns
Type | Description |
---|---|
System.String | The equivalent ISO-8601 timestamp. |
Iso8601ToDateTime(String)
Converts a ISO-8601 timestamp to a date.
Declaration
public static DateTime Iso8601ToDateTime(string iso8601)
Parameters
Type | Name | Description |
---|---|---|
System.String | iso8601 | The ISO-8601 timestamp to convert. |
Returns
Type | Description |
---|---|
DateTime | The equivalent date. |