UnixTimeUtils.FromSeconds method

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

FromSeconds(int)

Static

Returns an instance of DateTimeOffset 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 DateTimeOffset FromSeconds(int seconds)

Parameters

seconds int

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .

FromSeconds(long)

Static

Returns an instance of DateTimeOffset 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 DateTimeOffset FromSeconds(long seconds)

Parameters

seconds long

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .

FromSeconds(double)

Static

Returns an instance of DateTimeOffset 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 DateTimeOffset FromSeconds(double seconds)

Parameters

seconds Double

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .

FromSeconds(string)

Static

Returns an instance of DateTimeOffset 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 DateTimeOffset FromSeconds(string seconds)

Parameters

seconds String

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .