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

MySQL DateTime converted to java.sql.Date class #15

Open
jterrill opened this issue Jan 7, 2013 · 0 comments
Open

MySQL DateTime converted to java.sql.Date class #15

jterrill opened this issue Jan 7, 2013 · 0 comments

Comments

@jterrill
Copy link

jterrill commented Jan 7, 2013

I am testing the Drizzle driver with a MySQL server and noticed a difference in behavior regarding DateTime types. I am using the jdbc:mysql:thin: scheme in this case.

It looks like the MySQLType class maps the DATETIME type into a java.sql.Date class rather than a java.sql.TimeStamp I would expect. While both of these extend java.util.Date it appears the sql Date class drops the time data which makes the data incorrect / unusable.

Is there a known way to work around this when using the driver so that I get either a complete (with time) java.util.Date or java.sql.TimeStamp for datetime fields?

Thanks in advance,
Jody

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