-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throws an exception if the datetime cannot be converted. #16288
Throws an exception if the datetime cannot be converted. #16288
Conversation
src/OrchardCore/OrchardCore.Abstractions/Json/Serialization/DateTimeJsonConverter.cs
Show resolved
Hide resolved
@@ -40,15 +49,26 @@ public void JsonNode_WhenParseCalled_ConvertShortTimeFormatToTimeField() | |||
var dateField = jobject.SelectNode("DateFieldTest").ToObject<DateField>(); | |||
var dateTimeField = jobject.SelectNode("DateTimeFieldTest").ToObject<DateTimeField>(); | |||
var timezoneDateTimeFieldTest = jobject.SelectNode("TimezoneDateTimeFieldTest").ToObject<DateTimeField>(); | |||
var nullDateTimeField = jobject.SelectNode("NullDateTimeFieldTest").ToObject<DateTimeField>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create another test instead
This pull request has merge conflicts. Please resolve those before requesting a review. |
…teTimeJsonConverter.cs Co-authored-by: Hisham Bin Ateya <[email protected]>
src/OrchardCore/OrchardCore.Abstractions/Json/Serialization/DateTimeJsonConverter.cs
Show resolved
Hide resolved
This pull request has merge conflicts. Please resolve those before requesting a review. |
…hyzx86/OrchardCore into hyzx86/JsonDateTimeErrorHolding
src/OrchardCore/OrchardCore.Abstractions/Json/Serialization/DateTimeJsonConverter.cs
Show resolved
Hide resolved
Why did you change the exception to a
|
Throws an exception if the datetime cannot be converted.
Patch for PR #16205
/cc @hishamco