Skip to content
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

DateTimeFormatter-based FORMATDATETIME and PARSEDATETIME and other changes #3281

Merged
merged 5 commits into from Dec 19, 2021

Conversation

katzyn
Copy link
Contributor

@katzyn katzyn commented Dec 18, 2021

  1. FORMATDATETIME and PARSEDATETIME now use API from Java 8 to parse and format values. It supports resolution up to nanoseconds, LMT, proleptic Gregorian calendar and much wider range of values. I tried to preserve their old behavior, but I changed data type of PARSEDATETIME from TIMESTAMP to TIMESTAMP(9) WITH TIME ZONE to avoid issues with DST and other transitions. I also added a simple cache for 100 most recently used formats.
  2. Methods of JSR310Utils now have normal types of parameters and results instead of Object that was used for binary compatibility with Java 7.
  3. Database.checkPowerOff() now only checks whether this testing-only feature is in use, and if it is, calls new second method with the rest of its old code. With this change second method isn't compiled and isn't inlined by JVM, because it isn't used.

@katzyn katzyn merged commit 516061d into h2database:master Dec 19, 2021
@katzyn katzyn deleted the datetime branch December 19, 2021 02:02
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.

None yet

1 participant