DateTimeExtensionsFromUnixMilliseconds Method

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

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0-rc.1
C#
public static DateTime FromUnixMilliseconds(
	long milliseconds
)

Parameters

milliseconds  Int64
The number of milliseconds 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 milliseconds parameter.

Exceptions

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

See Also