MySQL str_to_date dates wrong in cf queries but correct in mysql?
After upgrading MySQL to 8 we noticed some odd date behaviors.
Example:
2024-06-28T02:11:51.000 stored in a varchar type field named tstamp
When we execute this statement in mysql workbench directly:
STR_TO_DATE(tstamp,'%Y-%m-%dT%H:%i') as listedon
The result is correct: 2024-06-28 02:11:00
The same exact query when done using a coldfusion query on the same field and database returns:
2024-06-27 22:11:00.0
The coldfusion SELECT is subtracting 4 hours from the date stored in a varchar field when we use str_to_date to format it?
Needless to say this is causing issues. Does anyone know of a possible cause or fix for this maybe changing db drivers so that I don't have to recoded all queries on our sites using str_to_date?
Thanks
Forrest

