Getting error "HOUR_OF_DAY: 2 -> 3" when running a MySQL query

So I’ve run into a strange issue. In my database I have a record with a timestamp “2018-03-11 02:21:00”. And when I use cfquery to to retrieve a dataset containing this record, I get the following error:

	lucee.runtime.exp.NativeException: HOUR_OF_DAY: 2 -> 3
 at java.util.GregorianCalendar.computeTime(
 at java.util.Calendar.updateTime(
 at java.util.Calendar.getTimeInMillis(
 at com.mysql.cj.mysqla.result.AbstractResultsetRow.decodeAndCreateReturnValue(
 at com.mysql.cj.mysqla.result.AbstractResultsetRow.getValueFromBytes(
 at com.mysql.cj.mysqla.result.ByteArrayRow.getValue(
 at com.mysql.cj.jdbc.result.ResultSetImpl.getNonStringValueFromRow(
 at com.mysql.cj.jdbc.result.ResultSetImpl.getDateOrTimestampValueFromRow(
 at com.mysql.cj.jdbc.result.ResultSetImpl.getTimestamp(
 at lucee.runtime.query.caster.TimestampCast.toCFType(
 at lucee.runtime.type.QueryImpl.fillResult(
 at lucee.runtime.type.QueryImpl.execute(
 at lucee.runtime.type.QueryImpl.<init>(
 at lucee.runtime.tag.Query.executeDatasoure(
 at lucee.runtime.tag.Query.doEndTag(
 at ...

After some research, I came across this StackOverflow post ( that leads me to believe that it is exactly because of Daylight Savings Time that I’m getting this, as that record exists during a time that was technically skipped over on Sunday, March 11 2018 due to Daylight Savings Time.

Is there any way to avoid throwing this error? The S.O post mentions to use Calendar.setLenient(true), but I don’t seem to have that low level of control over Lucee’s date parsing.

Thanks in advance.

EDIT #1: Including relevant sys info

MySql Extension 8.0.9
Windows 10 Pro Version 1709, build 16299.309
Java 1.8.0_161

please always include version number for lucee, extensions, os and db when asking questions

I apologize,

MySql Extension 8.0.9
Windows 10 Pro Version 1709, build 16299.309
Java 1.8.0_161

could you try the latest snapshot?

Just tried the and I’m still getting the error.

Are the Lucee Admin timezone and Windows 10 timezone the same?

I have also seen this error, in

It seemed to start after I set Legacy Datetime Code to false on one particular datasource, trying to debug a date issue in Hibernate. The site in question is now broken on pages that include a date query even after putting that back. Trying to debug that now.

Changing that value seems to have inserted ‘&serverTimezone=America/New_York’ into the connection string, which could not be removed by changing the timezone. This was apparently breaking the database connection. I had to edit the datasource in lucee-server.xml to get rid of it.