-
Notifications
You must be signed in to change notification settings - Fork 426
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
Allow constructing a microsoft.sql.DateTimeOffset
instance from a java.time.OffsetDateTime
value
#2340
Allow constructing a microsoft.sql.DateTimeOffset
instance from a java.time.OffsetDateTime
value
#2340
Conversation
e675f92
to
1ebf504
Compare
FYI, I did a force push to fix the pipeline issue. |
Also just noticed the second unit test ( Will fix it now. Rather than give the test value a wholly static value I think it's probably better to just fix the "seconds" value, similar to the "nanos" value. |
1ebf504
to
ae407c4
Compare
Fixed the test. Fixed the test value to |
ae407c4
to
859c32d
Compare
@tkyc Just a heads up. The current HEAD doesn't include the updated test. See https://github.com/microsoft/mssql-jdbc/compare/ae407c4ff5be6062fc63536c90edb532ffb45a0b..859c32db2a2d9822595d9d8b73849ae2962270b7 |
My mistake, could you push again? I had to do another force push which overwrote your last commit. |
859c32d
to
2ec7f00
Compare
2ec7f00
to
ae407c4
Compare
the reason the force-push was done by @tkyc was to get rid of the previous commits which was tied to the old versions of the pipelines for some reason and we wanted to remove CI-mssql-jdbc pipeline from the PR validation check. But now it seems with your latest force-push this came right back :( |
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.
pls use formatter to format all files
…va.time.OffsetDateTime value
ae407c4
to
46bbb6d
Compare
Done. Although used Intellij's Eclipse code style import support to use the mssql-jdbc_formatter.xml. If theres still an issue I'll install Eclipse and rerun. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2340 +/- ##
=============================================
- Coverage 73.60% 50.20% -23.41%
+ Complexity 6082 3793 -2289
=============================================
Files 142 143 +1
Lines 33123 33149 +26
Branches 5623 5630 +7
=============================================
- Hits 24380 16641 -7739
- Misses 6234 14122 +7888
+ Partials 2509 2386 -123 ☔ View full report in Codecov by Sentry. |
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.
Looks fine
Operates similarly to existing constructor however avoids additional expense of creating Timestamp instances and increased timezone related error potential, by directly converting java.time.OffsetDateTime instances.
Reverse of existing
DateTimeOffset.getOffsetDateTime()
method.Rounds precision to closest 100ns matching existing semantics of
Timestamp
based constructor. Values where nanos are within 50ns of the next second are rounded upwards to the next second; as per current semantics.Supercedes #2339