Can't select by datetime

32 views
Skip to first unread message

Henry Gelstor

unread,
Mar 21, 2017, 2:44:49 PM3/21/17
to Lucee
Hello-
Working on moving some stuff to Lucee:
CFDumping a select on a 5.5.50-MariaDB table containing a datetime column gives me this:
{ts '2016-09-01 16:43:12'}

If I run a select * from thetable where thedatetime="2016-09-01 16:43:12"  I get no rows back!

This USED TO work, returning me the matching row(s). What's going on?  Forgive me if I'm missing obvious, yep I AM confused.

MySQL-AB JDBC Driver mysql-connector-java-5.1.20 ( Revision: tonci...@oracle.com-20111003110438-qfydx066wsbydkbw ) (JDBC 4.0) 
Legacy Datetime Code set to True  Lucee:(4.5.2.018)
    
Thanks

Henry Gelstor

unread,
Mar 21, 2017, 4:09:24 PM3/21/17
to Lucee
Talking to myself I figured out that it's a timezone issue.  The server is in a different timezone than most of the people using it.  So this spawns 2 issues:  Whats the best way to correct the datetime value? 
Is this going to break when falling backward or springing forward?

It is absolutely crazy to select out a datetime value and not be able to use it in a subsequent query without adjusting it.

Help please somebody talk me off the bridge railing
Reply all
Reply to author
Forward
0 new messages