TimeUtils.GetUnixTimeFromDateTime method

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

GetUnixTimeFromDateTime(DateTime)

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 GetUnixTimeFromDateTime(DateTime date)

Parameters

date DateTime

The isntance of DateTime the timestamp should be based on.

Returns

int

An instance of int representing the Unix timestamp.