libeufin

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

commit 226334882e42cf8e086285892d3c51d7bd9d7a31
parent fec0b2f83f90180323b0a4d174506426d561dc65
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Tue, 24 Mar 2020 17:34:13 +0100

fix time conversion

from "gregorian calendar" to "joda datetime"

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -403,8 +403,8 @@ fun buildCamtString(history: SizedIterable<BankTransactionEntity>, type: Int): S private fun constructCamtResponse(type: Int, customerId: Int, header: EbicsRequest.Header): String { val dateRange = (header.static.orderDetails?.orderParams as EbicsRequest.StandardOrderParams).dateRange - val (start: DateTime, end: DateTime) = if (dateRange != null) { - Pair(Instant(dateRange.start).toDateTime(), Instant(dateRange.end).toDateTime()) + val (start: org.joda.time.DateTime, end: org.joda.time.DateTime) = if (dateRange != null) { + Pair(DateTime(dateRange.start.toGregorianCalendar().time), DateTime(dateRange.end.toGregorianCalendar().time)) } else Pair(DateTime(0), DateTime.now()) val history = extractHistory( customerId,