From 357b836b25ce47f5db3e9cf99e3dc51defa16650 Mon Sep 17 00:00:00 2001 From: Alejandro Revilla Date: Tue, 30 Aug 2022 11:20:25 -0300 Subject: [PATCH] ground postDate postDate granularity is 'date' (not timestamp). This should be handled automatically by the database, but in situations where the column is a timestamp instead of just date, we want to make sure we have the same time (00:00:00). --- modules/minigl/src/main/java/org/jpos/gl/GLSession.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/minigl/src/main/java/org/jpos/gl/GLSession.java b/modules/minigl/src/main/java/org/jpos/gl/GLSession.java index f009a71875..62b267f7c9 100644 --- a/modules/minigl/src/main/java/org/jpos/gl/GLSession.java +++ b/modules/minigl/src/main/java/org/jpos/gl/GLSession.java @@ -627,7 +627,7 @@ public void post (Journal journal, GLTransaction txn) txn.setJournal (journal); txn.setTimestamp (new Date()); if (txn.getPostDate() == null) - txn.setPostDate (txn.getTimestamp()); + txn.setPostDate (Util.floor(txn.getTimestamp())); else invalidateCheckpoints (txn); Collection rules = getRules (txn);