Fork me on GitHub

Using and seeing this error:

; Execution error (IllegalArgumentException) at java.util.GregorianCalendar/computeTime (
; HOUR_OF_DAY: 2 -> 3
com.mysql.cj.jdbc.exceptions.SQLError/createSQLException (
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping/translateException (
com.mysql.cj.jdbc.result.ResultSetImpl/getTimestamp (
com.mysql.cj.jdbc.result.ResultSetImpl/getObject (
next.jdbc.result-set.MapResultSetBuilder/with_column (result_set.clj:208)
next.jdbc.result-set/row-builder (result_set.clj:440)
This isn't a problem, rather something to do with converting a TIMESTAMP value and daylight savings time, but I'm hoping someone knows how to work around it using Thanks.


Using plan instead of execute! on this query made this problem go away, which I don't understand, but I guess my problem is solved.


i read through the underlying gregorian calendar compute time method and i'm happy to let you know that it looks horrible 😄


your java version looks to differ a little bit (line numbers a bit off), but by the look of the exception this block blowing up is the same


if you can grab a hold with your debugger of what is going on there, it would be interesting to know .... right now this massive mutability array code there is not what i want to read 😄 my blind guess though -> there is the "empty hour" in dst switch (when the clock is turned from 2 to 3) that can not have anything in it .... any chance that your code tries to put something there?


just in general - i would advise anyone to store whatever dates they need in utc, if at all possible. if users prefer to watch the output in some specific timezone then that can be done at interpretation level or even ui level. it is so much easier to handle utc than anything else 🙂


if you can reproduce it in a test in your IDE and grab a hold of the gregorian calendar instance during the exception - would be helpful to know what you have managed to create 🙂


Thanks. I'll try to return to it once I muddle through this migration. I am curious why switching from execute! to plan made any difference, more than a little spooky.


@U066LQXPZ when you reduce over plan, only columns you explicitly request are fetched from the underlying ResultSet object and no result set builder is involved; when you use execute!, all columns are fetched and run through the result set builder.


@U04V70XH6 I am explicitly fetching the (or at least a) date with plan. I'll double-check and see if there's maybe something weird with a date column and/or it isn't being explicitly processed via plan.


Hmm, the only difference then should be that execute! will cause get-by-column-index (i.e., (.getObject rs i)) and plan will cause get-by-column-label (i.e., (.getObject rs label) -- access via string name of column in the query). So there may be an internal difference between those in the MySQL JDBC driver in terms of how data transformation is handled...