UnixTimeUtils.FromSeconds method
Namespace | Skybrud.Essentials.Time.UnixTime |
---|---|
Assembly | Skybrud.Essentials.dll |
FromSeconds(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 FromSeconds(int seconds)
Parameters
seconds
int
The Unix timestamp specified in seconds.
Returns
The timestamp as an instance of DateTimeOffset .
FromSeconds(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 FromSeconds(long seconds)
Parameters
seconds
long
The Unix timestamp specified in seconds.
Returns
The timestamp as an instance of DateTimeOffset .
FromSeconds(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 FromSeconds(double seconds)
Parameters
seconds
Double
The Unix timestamp specified in seconds.
Returns
The timestamp as an instance of DateTimeOffset .
FromSeconds(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 FromSeconds(string seconds)
Parameters
seconds
String
The Unix timestamp specified in seconds.
Returns
The timestamp as an instance of DateTimeOffset .