libeufin

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

commit 47e778d7d05c43e3f6b489143b2163082bae127b
parent 75111f1d98a66b53c03017b8e2837bbfbd8baeed
Author: Florian Dold <florian.dold@gmail.com>
Date:   Fri, 19 Jun 2020 16:39:30 +0530

use timezones for EBICS order params

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/DB.kt | 4++++
Mutil/src/main/kotlin/time.kt | 10++++------
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt @@ -220,6 +220,10 @@ object NexusBankAccountsTable : IdTable<String>() { val bankCode = text("bankCode") val defaultBankConnection = reference("defaultBankConnection", NexusBankConnectionsTable).nullable() + val lastStatementCreationTimestamp = long("lastStatementCreationTimestamp").nullable() + val lastReportCreationTimestamp = long("lastReportCreationTimestamp").nullable() + val lastNotificationCreationTimestamp = long("lastNotificationCreationTimestamp").nullable() + // Highest bank message ID that this bank account is aware of. val highestSeenBankMessageId = integer("highestSeenBankMessageId") diff --git a/util/src/main/kotlin/time.kt b/util/src/main/kotlin/time.kt @@ -23,18 +23,16 @@ import java.time.* import java.time.format.DateTimeFormatter fun LocalDateTime.toZonedString(): String { - val dateFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME - return dateFormatter.format(this.atZone(ZoneId.systemDefault())) + return DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.atZone(ZoneId.systemDefault())) } fun LocalDateTime.toDashedDate(): String { - val dtf = DateTimeFormatter.ISO_LOCAL_DATE - return dtf.format(this) + return DateTimeFormatter.ISO_DATE.format(this) } fun parseDashedDate(date: String): LocalDateTime { - val dtf = DateTimeFormatter.ISO_LOCAL_DATE - val asDate = LocalDate.from(LocalDate.parse(date, dtf)) + val dtf = DateTimeFormatter.ISO_DATE + val asDate = LocalDate.parse(date, dtf) return asDate.atStartOfDay() }