Skip to main content

ResQ.Protocols.ProtocolExtensions

ProtocolExtensions.FromUnixMs(this long) Method

Converts a Unix timestamp in milliseconds to a System.DateTimeOffset.

Parameters

timestampMs System.Int64 The Unix timestamp in milliseconds since January 1, 1970 UTC.

Returns

System.DateTimeOffset
A System.DateTimeOffset representing the specified timestamp.

Example

Remarks

This method handles the conversion from Unix time (common in protobuf and JSON APIs) to .NET’s System.DateTimeOffset type. The resulting value has UTC as its offset.