We migrated from to ojdbc6-11.2.0.3.0
to ojdbc7-12.1.0.1
and observed a change in the ResultSet#getDate()
semantics. Previously the java.sql.Date
returned would be 'normalized' by having set the hours, minutes, seconds and milliseconds to zero according to the contract specified on java.sql.Date
. With ojdbc7
this is no longer the case and java.sql.Date
has the hours, minutes, seconds and milliseconds set according to the value on the database.
I looked at the Javadoc of ResultSet#getDate()
and it doesn't explicitly say which of the behaviors is the correct one. I would have assumed the old behavior was what the specification intended. Am I right? Have we encountered a driver bug?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…