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

SQLite date format issues #315

Closed
hraberg opened this issue Aug 8, 2019 · 7 comments
Closed

SQLite date format issues #315

hraberg opened this issue Aug 8, 2019 · 7 comments
Labels
1.x bug Something isn't working

Comments

@hraberg
Copy link
Contributor

hraberg commented Aug 8, 2019

See https://circleci.com/gh/juxt/crux/2429
java.lang.NumberFormatException: For input string: ".20018E.200184E4"

And https://circleci.com/gh/juxt/crux/2416
#inst "2019-07-07T12:24:32.019-00:00" vs
#inst "2019-08-07T12:24:32.019-00:00"
(Different months.)

@hraberg hraberg added the bug Something isn't working label Aug 8, 2019
@hraberg hraberg added this to the Beta milestone Aug 8, 2019
@hraberg
Copy link
Contributor Author

hraberg commented Aug 8, 2019

Maybe related? xerial/sqlite-jdbc#88

@hraberg
Copy link
Contributor Author

hraberg commented Aug 8, 2019

Why are dates treated as strings and parsed, isn't there native dates or timestamps in SQLite?

@hraberg
Copy link
Contributor Author

hraberg commented Aug 8, 2019

This test has a few cases which deals with dates:
https://github.com/xerial/sqlite-jdbc/blob/master/src/test/java/org/sqlite/QueryTest.java

@hraberg
Copy link
Contributor Author

hraberg commented Aug 8, 2019

An alternative would be to simply use longs inside the db.

@hraberg
Copy link
Contributor Author

hraberg commented Aug 8, 2019

Also, the current use of a global SimpleDateFromat isn't thread safe.

@hraberg
Copy link
Contributor Author

hraberg commented Aug 8, 2019

^ above might fix this, but there's no real reason to assume the tests have had threading issues, so we'll see.

@hraberg
Copy link
Contributor Author

hraberg commented Aug 14, 2019

Haven't seen this in a while now, assuming the fix above solved it. We'll reopen if not.

@hraberg hraberg closed this as completed Aug 14, 2019
@jarohen jarohen removed this from the Beta milestone Nov 15, 2019
@jarohen jarohen added the 1.x label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants