Skip to content

Commit

Permalink
Merge pull request #61 from tryAGI/bot/update-openapi_202410081510
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 8, 2024
2 parents c16298f + 826b89b commit b0d5048
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ public class UnixTimestampJsonConverter : global::System.Text.Json.Serialization
{
if (reader.TryGetInt64(out long unixTimestamp))
{
return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestamp);
if (unixTimestamp >= -62135596800L && unixTimestamp <= 253402300799L)
{
return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestamp);
}

return global::System.DateTimeOffset.FromUnixTimeMilliseconds(unixTimestamp);
}
if (reader.TryGetInt32(out int unixTimestampInt))
{
Expand Down

0 comments on commit b0d5048

Please sign in to comment.