Table of Contents

Method GetDateTimeOffsetFromMilliseconds

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetDateTimeOffsetFromMilliseconds(long, bool)

Helper method to create a DateTimeOffset from Unix time milliseconds for targets that do not support this natively.

public static DateTimeOffset GetDateTimeOffsetFromMilliseconds(long unixTime, bool shouldThrow = true)

Parameters

unixTime long

Unix time milliseconds to convert.

shouldThrow bool

Whether the method should throw on failure. Defaults to true.

Returns

DateTimeOffset

Calculated DateTimeOffset.