TimeHelper.GetDateTimeOffsetFromUnixTime method

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

GetDateTimeOffsetFromUnixTime(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 GetDateTimeOffsetFromUnixTime(int timestamp)

Parameters

timestamp int

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .

GetDateTimeOffsetFromUnixTime(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 GetDateTimeOffsetFromUnixTime(long timestamp)

Parameters

timestamp long

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .

GetDateTimeOffsetFromUnixTime(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 GetDateTimeOffsetFromUnixTime(double timestamp)

Parameters

timestamp Double

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .

GetDateTimeOffsetFromUnixTime(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 GetDateTimeOffsetFromUnixTime(string timestamp)

Parameters

timestamp String

The Unix timestamp specified in seconds.

Returns

The timestamp as an instance of DateTimeOffset .