TimeHelper.GetDateTimeOffsetFromUnixTime method
Namespace | Skybrud.Essentials.Time |
---|---|
Assembly | Skybrud.Essentials.dll |
GetDateTimeOffsetFromUnixTime(int)
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)
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)
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)
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 .