C# Class Org.BouncyCastle.Utilities.Date.DateTimeUtilities

Mostrar archivo Open project: nonorganic/dssnet Class Usage Examples

Public Properties

Property Type Description
UnixEpoch System.DateTime

Public Methods

Method Description
CurrentUnixMs ( ) : long

Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).

DateTimeToUnixMs ( System.DateTime dateTime ) : long

Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.

UnixMsToDateTime ( long unixMs ) : System.DateTime

Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).

Private Methods

Method Description
DateTimeUtilities ( ) : System

Method Details

CurrentUnixMs() public static method

Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
public static CurrentUnixMs ( ) : long
return long

DateTimeToUnixMs() public static method

Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.
'dateTime' is before epoch.
public static DateTimeToUnixMs ( System.DateTime dateTime ) : long
dateTime System.DateTime A UTC DateTime value not before epoch.
return long

UnixMsToDateTime() public static method

Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC).
public static UnixMsToDateTime ( long unixMs ) : System.DateTime
unixMs long Number of milliseconds since the epoch.
return System.DateTime

Property Details

UnixEpoch public_oe static_oe property

public static DateTime,System UnixEpoch
return System.DateTime