Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​IdentityModel.​Tokens.​EpochTime

Assembly: Microsoft.IdentityModel.Tokens

Inheritance: object → EpochTime

Returns the absolute DateTime or the Seconds since Unix Epoch, where Epoch is UTC 1970-01-01T0:0:0Z.

Fields and Constants

public static readonly System.​DateTime
UnixEpoch
DateTime as UTV for UnixEpoch

Methods

public static long
GetIntDate​(System.​DateTime datetime)
Gets the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the desired date/time.
Returns The number of seconds since Unix Epoch.
datetime The DateTime to convert to seconds.
Remarks If <paramref name="datetime" /> is less than Unix Epoch, returns 0.
public static System.​DateTime
DateTime​(long secondsSinceUnixEpoch)
Creates a <see cref="M:Microsoft.IdentityModel.Tokens.EpochTime.DateTime(System.Int64)" /> from epoch time.
Returns The DateTime in UTC.
secondsSinceUnixEpoch The number of seconds since Unix Epoch.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object