libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 9b94c90afbf01d77271657f9f239da20cee51e4d
parent 13f060db756123bff121dee2e24f741aa884d033
Author: Florian Dold <florian@dold.me>
Date:   Sun, 17 Jan 2021 00:34:01 +0100

round timestamp

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt @@ -282,7 +282,7 @@ private suspend fun talerTransfer(call: ApplicationCall) { * Normally should point to the next round where the background * routine will send new PAIN.001 data to the bank; work in progress.. */ - timestamp = GnunetTimestamp(System.currentTimeMillis()), + timestamp = roundTimestamp(GnunetTimestamp(System.currentTimeMillis())), row_id = opaqueRowId ) ), @@ -291,6 +291,10 @@ private suspend fun talerTransfer(call: ApplicationCall) { ) } +fun roundTimestamp(t: GnunetTimestamp): GnunetTimestamp { + return GnunetTimestamp(t.t_ms - (t.t_ms % 1000)) +} + /** * Serve a /taler/admin/add-incoming */