TimeUtils.GetUnixTimeFromDateTimeOffset method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time
Assembly Skybrud.Essentials.dll

GetUnixTimeFromDateTimeOffset(DateTimeOffset)

Static

Returns the Unix timestamp for the specified date. 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 int GetUnixTimeFromDateTimeOffset(DateTimeOffset date)

Parameters

The isntance of DateTimeOffset the timestamp should be based on.

Returns

int

An instance of int representing the Unix timestamp.