There should be no round up algorithm in message retrieval. Propably following code needs to be modified and tested:
if (derby) { get_messages_st.setTimestamp(3, collection); get_messages_st.setInt(4, offset); get_messages_st.setInt(5, limit); } else { if(collection==null){ get_messages_st.setInt(3, limit); get_messages_st.setInt(4, offset); }else{ long milis = collection.getTime() / (24 * 60 * 60 * 1000); <==== Round up? get_messages_st.setDate(3, new java.sql.Date(milis * 24 * 60 * 60 * 1000)); <==== Round up? get_messages_st.setInt(4, limit); get_messages_st.setInt(5, offset); } }
I removed this round up for all databases to allow retrieval of messages for more than one day. I also changed sql queries to fix this.
There should be no round up algorithm in message retrieval. Propably following code needs to be modified and tested: