Skip to content

Commit a678c57

Browse files
stephentoubBrent Schmaltz
authored and
Brent Schmaltz
committed
Stop boxing Int64 in JsonClaimSet.GetDateTime (#2168)
1 parent 2fb7a51 commit a678c57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.IdentityModel.JsonWebTokens/Json/JsonClaimSet.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ internal DateTime GetDateTime(string key)
237237
if (!RootElement.TryGetProperty(key, out JsonElement jsonElement))
238238
return DateTime.MinValue;
239239

240-
return EpochTime.DateTime(Convert.ToInt64(Math.Truncate(Convert.ToDouble(ParseTimeValue(key, jsonElement), CultureInfo.InvariantCulture))));
240+
return EpochTime.DateTime(Convert.ToInt64(Math.Truncate((double)ParseTimeValue(key, jsonElement))));
241241
}
242242

243243
internal T GetValue<T>(string key)

0 commit comments

Comments
 (0)