Skip to content

Adjusting date/time handling#2097

Merged
Paultagoras merged 2 commits intomainfrom
handle-datetimes-with-calendar
Jan 20, 2025
Merged

Adjusting date/time handling#2097
Paultagoras merged 2 commits intomainfrom
handle-datetimes-with-calendar

Conversation

@Paultagoras
Copy link
Contributor

@Paultagoras Paultagoras commented Jan 20, 2025

Summary

  • Adjusting PreparedStatement encoding to handle Instant
  • Adjusting calendar usages to avoid setTime
  • Adjusting tests to use local timezone (because new Date/Time/Timestamp all show the local timezone)

Closes #2089

Checklist

Delete items not relevant to your PR:

  • Closes #
  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@Paultagoras Paultagoras self-assigned this Jan 20, 2025
@sonarqubecloud
Copy link

Copy link
Contributor

@mzitnik mzitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (cal == null) {
cal = new GregorianCalendar();
cal.setTime(x);
cal = new GregorianCalendar(TimeZone.getTimeZone("UTC"));//This says whatever date is in UTC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have default for it

@Paultagoras Paultagoras merged commit c1478f9 into main Jan 20, 2025
30 checks passed
@Paultagoras Paultagoras deleted the handle-datetimes-with-calendar branch January 20, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[jdbc-v2] date/dateTime tests fail when client timezone not UTC/GMT

2 participants