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