summaryrefslogtreecommitdiff
path: root/nexus
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-01-17 00:34:01 +0100
committerFlorian Dold <florian@dold.me>2021-01-17 00:34:01 +0100
commit9b94c90afbf01d77271657f9f239da20cee51e4d (patch)
treef1304b33d6b9c7859458b0aab26631a66759d4dd /nexus
parent13f060db756123bff121dee2e24f741aa884d033 (diff)
downloadlibeufin-9b94c90afbf01d77271657f9f239da20cee51e4d.tar.gz
libeufin-9b94c90afbf01d77271657f9f239da20cee51e4d.tar.bz2
libeufin-9b94c90afbf01d77271657f9f239da20cee51e4d.zip
round timestamp
Diffstat (limited to 'nexus')
-rw-r--r--nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
index 5f5fb64f..ddf67979 100644
--- 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
*/