I have a query in mysql which compares 2 dates like this
convert_tz(updatedDate,\'+05:30\',\'-05:00\') < ?
the convert function returns
Give this a try.
Set timestamp parameter as you are setting now
pst.setTimestamp(1, new java.sql.Timestamp(end.getTimeInMillis()));
.
During database call, JDBC driver may already be converting input date/time values to GMT. So the date value that database is dealing with won't have to take timezones of input date into considerations which may differ from one client to other.
Instead of setting from_tz as '+05:30'
convert_tz(updatedDate,'+05:30','-05:00')
Set from_tz as '00:00'
convert_tz(updatedDate,'00:00','-05:00')