Method GetDateTimeOffsetFromMilliseconds
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.dll
GetDateTimeOffsetFromMilliseconds(long, bool)
Helper method to create a System.DateTimeOffset from Unix time milliseconds for targets that do not support this natively.
public static DateTimeOffset GetDateTimeOffsetFromMilliseconds(long unixTime, bool shouldThrow = true)
Parameters
unixTime
longUnix time milliseconds to convert.
shouldThrow
boolWhether the method should throw on failure. Defaults to true.
Returns
- DateTimeOffset
Calculated System.DateTimeOffset.