Skip to content

Revert DateTimeOffset deprecation for GA compatibility - #3035

Merged
Divang Sharma (divang) merged 1 commit into
mainfrom
user/divang/revert-datetimeoffset-deprecation
Sep 1, 2026
Merged

Divang Sharma (divang) merged 1 commit into
mainfrom
user/divang/revert-datetimeoffset-deprecation

Conversation

@divang

Copy link
Copy Markdown
Contributor

Description
This PR reverts #2920, which deprecated microsoft.sql.DateTimeOffset and introduced driver-specific APIs using java.time.OffsetDateTime.

The rollback is required for GA readiness to preserve the established public API and avoid introducing compatibility changes in the current release.

Changes
Removes the driver-specific getOffsetDateTime() APIs.
Removes the driver-specific setOffsetDateTime() APIs.
Removes the driver-specific updateOffsetDateTime() APIs.
Removes the deprecation of microsoft.sql.DateTimeOffset.
Removes deprecation annotations from the existing getDateTimeOffset(), setDateTimeOffset(), and updateDateTimeOffset() APIs.
Restores the associated tests to the legacy API behavior.
Removes the reverted feature entry from CHANGELOG.md.
Preserves standard JDBC support for getObject(..., OffsetDateTime.class) and existing conversion methods.
Motivation
Although the legacy APIs remained available, promoting OffsetDateTime as the canonical representation introduced externally observable API and behavior changes close to GA.

Reverting the change preserves compatibility with applications that currently depend on:

microsoft.sql.DateTimeOffset
Existing SQL Server-specific getters, setters, and update methods
Established datetimeoffset handling across prepared statements, callable statements, result sets, bulk copy, and Always Encrypted
The OffsetDateTime migration can be reconsidered in a future release with a dedicated compatibility and migration plan.

Related
Reverts #2920
Supersedes the metadata direction proposed in #3030 for the current GA release.

@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.59%. Comparing base (07ce121) to head (88b16a9).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3035      +/-   ##
============================================
+ Coverage     60.55%   60.59%   +0.03%     
+ Complexity     5258     5212      -46     
============================================
  Files           153      153              
  Lines         36808    36680     -128     
  Branches       6764     6732      -32     
============================================
- Hits          22289    22226      -63     
+ Misses        10736    10625     -111     
- Partials       3783     3829      +46     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@divang
Divang Sharma (divang) merged commit d60dc48 into main Sep 1, 2026
23 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Closed/Merged PRs in MSSQL JDBC Sep 1, 2026
@divang Divang Sharma (divang) added this to the 13.6.0 milestone Sep 1, 2026
@divang Divang Sharma (divang) self-assigned this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed/Merged PRs

Development

Successfully merging this pull request may close these issues.

3 participants