Class EpochTimeExtensions
Useful extension methods for epoch time.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: IRM.IdentityModel
Assembly: IRM.dll
Syntax
public static class EpochTimeExtensions
Methods
ToDateTimeFromEpoch(Int64)
Converts the given epoch time to a System.DateTime with System.DateTimeKind.Utc kind.
Declaration
public static DateTime ToDateTimeFromEpoch(this long intDate)
Parameters
System.Int64
intDate
|
Returns
System.DateTime
|
ToDateTimeOffsetFromEpoch(Int64)
Converts the given epoch time to a UTC System.DateTimeOffset.
Declaration
public static DateTimeOffset ToDateTimeOffsetFromEpoch(this long intDate)
Parameters
System.Int64
intDate
|
Returns
System.DateTimeOffset
|
ToEpochTime(DateTime)
Converts the given date value to epoch time.
Declaration
public static long ToEpochTime(this DateTime dateTime)
Parameters
System.DateTime
dateTime
|
Returns
System.Int64
|
ToEpochTime(DateTimeOffset)
Converts the given date value to epoch time.
Declaration
public static long ToEpochTime(this DateTimeOffset dateTime)
Parameters
System.DateTimeOffset
dateTime
|
Returns
System.Int64
|