-
Notifications
You must be signed in to change notification settings - Fork 425
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
java.time.OffsetDateTime value sent to the server should not be affected by the default time zone. #831
java.time.OffsetDateTime value sent to the server should not be affected by the default time zone. #831
Conversation
…as a different time zone than the default time zone is passed to `PreparedStatement#setObject()`, the driver sends an incorrect value.
…Time(). `java.sql.Timestamp#getTime()` subsequently invokes `java.util.Date#normalize()` which takes the default TimeZone into account.
Codecov Report
@@ Coverage Diff @@
## dev #831 +/- ##
============================================
+ Coverage 49.69% 49.93% +0.23%
- Complexity 2880 2884 +4
============================================
Files 117 118 +1
Lines 27998 28006 +8
Branches 4666 4673 +7
============================================
+ Hits 13915 13984 +69
+ Misses 11839 11772 -67
- Partials 2244 2250 +6
Continue to review full report at Codecov.
|
Any news on this PR? This is really a problem on my side as well. |
hi @petarov, Sorry it had taken us a while to get to this. We are now in the process of reviewing this PR and I am tasked to run this through our test lab. Once this is completed we will be looking at merging this for the upcoming release. Thanks for your patience! |
Although
SQLServerPreparedStatement#setObject(int, Object)
supportsjava.time.OffsetDateTime
, the driver sends an incorrect temporal data when the parameter has a different time zone than the default time zone.Please see the attached test case.
java.sql.Timestamp#getTime()
used inDTV#sendTemporal()
subsequently invokesjava.util.Date#normalize()
which takes the default TimeZone into account.