-
Notifications
You must be signed in to change notification settings - Fork 429
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
Fix for updating datetime value #962
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #962 +/- ##
============================================
- Coverage 50.58% 49.83% -0.76%
+ Complexity 2918 2847 -71
============================================
Files 120 120
Lines 27987 28004 +17
Branches 4678 4682 +4
============================================
- Hits 14158 13956 -202
- Misses 11532 11789 +257
+ Partials 2297 2259 -38
Continue to review full report at Codecov.
|
I re-ran the CI build and it passed: https://dev.azure.com/sqlclientdrivers-ci/mssql-jdbc/_build/results?buildId=278 |
Starting from SQL Server 2016, the rounding logic for inserting datetime value has been changed. Instead of uniformly rounding up values normally (<=4 rounds down, >=5 rounds up), the logic present in the getRoundedMilliseconds method shows how the numbers are actually rounded.
The writeRPCDateTime method that gets used during updating a datetimecolumn wasn't correctly reflecting this, and this PR addresses that issue.