Repository navigation
Split creation logic of DateTime and DateTimeOffset in Utf8JsonReader - #39541
Conversation
| } | ||
|
|
||
| [Fact] | ||
| public static void Regression39067_TestingDateTimeMinValue() |
There was a problem hiding this comment.
Is it possible to run this in RemoteExecutor and locally modify the timezone used? Not sure if that's possible or not, I'd imagine we might have similar requirements for DateTime types though.
There was a problem hiding this comment.
I've tried to do this before but was advised that this can affect other tests, or the test might crash and we'll not be able to revert the system settings.
There was a problem hiding this comment.
Is it possible to run this in RemoteExecutor and locally modify the timezone used?
Time zone setting is user global setting and not process setting. I wouldn't recommend that.
| public int OffsetMinutes; | ||
| public bool OffsetNegative => OffsetToken == JsonConstants.Hyphen; | ||
| public byte OffsetToken; | ||
| if (!TryParseDateTimeOffset(source, ref parseData)) |
There was a problem hiding this comment.
Why is DateTimeParseData being passed by ref here rather than the TryParseDateTimeOffset new-ing one up and returning as an out?
| } | ||
|
|
||
| [Fact] | ||
| public static void Regression39067_TestingDateTimeMinValue() |
There was a problem hiding this comment.
nit: Add a link to the issue within a comment.
|
This change will not affect packaging (the only CI leg left), so it's fairly safe to merge. |
|
@layomia tested this PR locally, now only six tests fail for me in JSON, but these are due to issues in tests. I'll send a PR to fix them. |
Awesome, thanks! |
|
This change made it into release/3.0 with the last integration from master. |
Commit migrated from dotnet/corefx@05c0f51
Fixes https://github.com/dotnet/corefx/issues/39067.
I verified the fix by changing my local date settings to the settings in the issue and a few other time-zones +|- UTC.
Utf8Parsermight also have this edge-case issue given that reader's parsing logic was modeled after it. I'll check.cc @ericstj @mholo65 @steveharter fyi.