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

eliminate references to java.util.Date, java.util.Calendar, java.util.GregorianCalendar #16

Open
bpangburn opened this issue Dec 11, 2020 · 2 comments

Comments

@bpangburn
Copy link
Owner

Modify code using java.util.Date, java.util.Calendar, java.util.GregorianCalendar to use the newer java.time API.

@bpangburn
Copy link
Owner Author

@bpangburn
Copy link
Owner Author

bpangburn commented May 17, 2021

The comment in this thread under "tl;dr" is pretty helpful:
https://stackoverflow.com/questions/8530545/java-sql-date-time

Discovered that H2 is a JDBC 4.1 driver, not 4.2 so using

LocalDateTime ldt = myResultSet.getObject( … , LocalDateTime.class ) ;

is not an option and throws a 'java.sql.SQLFeatureNotSupportedException: Not supported yet.' exception.

Can check driver numbers with:

connection.getMetaData().getJDBCMajorVersion()
connection.getMetaData().getJDBCMinorVersion()

Will likely have to support String conversions for now or convert from/to epoch/milliseconds.

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

No branches or pull requests

1 participant