DateTimeExtensionsFromUnixSeconds Method

Gets a Utc DateTime from the seconds elapsed since the Unix Epoch time (1970-01-01T00:00Z).

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public static DateTime FromUnixSeconds(
	long seconds
)

Parameters

seconds  Int64
The number of seconds elapsed since the Unix Epoch time (1970-01-01T00:00Z), not counting leap seconds. Negative values as also allowed.

Return Value

DateTime
A Utc DateTime that represents the same moment as the specified seconds parameter.

Exceptions

ArgumentOutOfRangeExceptionseconds is less than -62,135,596,800, or greater than 253,402,300,799.

See Also