Class Iso8601Timestamp
Utility class to assist with ISO-8601 timestamp conversions.
Inheritance
System.Object
Iso8601Timestamp
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Iso8601Timestamp
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 |
---|---|---|
System.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 |
---|---|
System.DateTime | The equivalent date. |