-
Notifications
You must be signed in to change notification settings - Fork 332
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
Support DateTimeKind connection setting. #479
Conversation
Oops, I missed this comment in the issue. I can change it, unless you don't feel strongly about it, @bgrainger. |
@@ -26,6 +26,7 @@ public void Defaults() | |||
#endif | |||
Assert.Equal(15u, csb.ConnectionTimeout); | |||
Assert.False(csb.ConvertZeroDateTime); | |||
Assert.Equal(DateTimeKind.Unspecified, csb.DateTimeKind); |
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.
Needs to be in a #if !BASELINE
block.
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.
Oops, forgot to run the BASELINE tests, thanks.
tests/SideBySide/DataTypes.cs
Outdated
public void QueryDateTimeKind(DateTimeKind kindOption, DateTimeKind kindIn, bool success) | ||
{ | ||
var csb = AppConfig.CreateConnectionStringBuilder(); | ||
csb.DateTimeKind = kindOption; |
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.
This line won't compile with Connector/NET so this whole test needs to be #if !BASELINE
.
Now that you're handling all of |
Okay, I'll leave it as |
AppVeyor failed but I don't think due to my code. |
tests/SideBySide/DataTypes.cs
Outdated
@@ -549,6 +549,55 @@ public void QueryZeroDateTime(bool convertZeroDateTime) | |||
} | |||
} | |||
|
|||
[Theory] |
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.
MySqlDateTimeKind
doesn't exist in Connector/NET so this entire test should be #if
d out.
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.
I think the BASELINE behaviour will be tested by DateTimeKind.Unspecified
above?
If the tests pass, I'll rebase and force push. |
Rebased. |
Shipped in 0.40.1. |
No changes to
DateTimeOffset
at this point.