TimeHelper.GetDateTimeFromUnixTime method

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

GetDateTimeFromUnixTime(int)

Static

Returns an instance of DateTime based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

public static DateTime GetDateTimeFromUnixTime(int timestamp)

Parameters

timestamp int

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTime .

GetDateTimeFromUnixTime(long)

Static

Returns an instance of DateTime based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

public static DateTime GetDateTimeFromUnixTime(long timestamp)

Parameters

timestamp long

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTime .

GetDateTimeFromUnixTime(double)

Static

Returns an instance of DateTime based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

public static DateTime GetDateTimeFromUnixTime(double timestamp)

Parameters

timestamp Double

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTime .

GetDateTimeFromUnixTime(string)

Static

Returns an instance of DateTime based on the amount of seconds since the start of the Unix epoch - that is 1st of January, 1970 - 00:00:00 GMT.

public static DateTime GetDateTimeFromUnixTime(string timestamp)

Parameters

timestamp String

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTime .