UnixTimeUtils.ToSeconds method
Version 1.1.28
.NET Framework 4.8
| Namespace | Skybrud.Essentials.Time.UnixTime |
|---|---|
| Assembly | Skybrud.Essentials.dll |
ToSeconds(DateTime)
Static
Returns the Unix timestamp for the specified timestamp. The Unix timestamp is defined as the
amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.
public static double ToSeconds(DateTime timestamp)
ToSeconds(DateTimeOffset)
Static
Returns the Unix timestamp for the specified timestamp. The Unix timestamp is defined as the
amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.
public static double ToSeconds(DateTimeOffset timestamp)
Parameters
timestamp
DateTimeOffset
The isntance of DateTimeOffset the timestamp should be based on.