Class DateUtils
Helper class to convert dates from ISO strings to epoch timestamps and vice versa.
Assembly: Casper.Network.SDK.dll
Syntax
Methods
|
Edit this page
View Source
ToEpochTime(DateTime)
Converts a DateTime object to epoch timestamp.
Declaration
public static ulong ToEpochTime(DateTime datetime)
Parameters
Returns
|
Edit this page
View Source
ToEpochTime(string)
Converts an ISO formatted date string to epoch timestamp.
Declaration
public static ulong ToEpochTime(string datetime)
Parameters
| Type |
Name |
Description |
| string |
datetime |
|
Returns
|
Edit this page
View Source
ToISOString(ulong)
Converts an epoc timestamp (in milliseconds) to an ISO formatted date string.
Declaration
public static string ToISOString(ulong epochTimeInMillis)
Parameters
| Type |
Name |
Description |
| ulong |
epochTimeInMillis |
|
Returns