Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value.
Namespace: Org.BouncyCastle.Utilities.DateAssembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0
Syntax
C# |
---|
public static long DateTimeToUnixMs( DateTime dateTime ) |
Visual Basic |
---|
Public Shared Function DateTimeToUnixMs ( _ dateTime As DateTime _ ) As Long |
Visual C++ |
---|
public: static long long DateTimeToUnixMs( DateTime dateTime ) |
Parameters
- dateTime
- Type: System..::..DateTime
A UTC DateTime value not before epoch.
Return Value
Number of whole milliseconds after epoch.
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentException | 'dateTime' is before epoch. |