diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/FlickerCodeTanChallenge.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/FlickerCodeTanChallenge.kt index 175ea7d9..1df4ac0b 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/FlickerCodeTanChallenge.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/FlickerCodeTanChallenge.kt @@ -1,6 +1,6 @@ package net.codinux.banking.fints.model -import kotlinx.datetime.LocalDateTime +import kotlinx.datetime.Instant import net.codinux.banking.fints.tan.FlickerCode @@ -13,7 +13,7 @@ open class FlickerCodeTanChallenge( tanMediaIdentifier: String?, bank: BankData, account: AccountData? = null, - tanExpirationTime: LocalDateTime? = null + tanExpirationTime: Instant? = null ) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account, tanExpirationTime) { override fun toString(): String { diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/ImageTanChallenge.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/ImageTanChallenge.kt index 6b646f25..d86004ab 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/ImageTanChallenge.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/ImageTanChallenge.kt @@ -1,6 +1,6 @@ package net.codinux.banking.fints.model -import kotlinx.datetime.LocalDateTime +import kotlinx.datetime.Instant import net.codinux.banking.fints.tan.TanImage @@ -13,7 +13,7 @@ open class ImageTanChallenge( tanMediaIdentifier: String?, bank: BankData, account: AccountData? = null, - tanExpirationTime: LocalDateTime? = null + tanExpirationTime: Instant? = null ) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account, tanExpirationTime) { override fun toString(): String { diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/TanChallenge.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/TanChallenge.kt index 19981f3d..d0b19cd7 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/TanChallenge.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/TanChallenge.kt @@ -1,7 +1,6 @@ package net.codinux.banking.fints.model import kotlinx.datetime.Instant -import kotlinx.datetime.LocalDateTime import net.codinux.banking.fints.extensions.nowExt import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium import net.codinux.banking.fints.response.BankResponse @@ -21,7 +20,7 @@ open class TanChallenge( * * In server's time zone, that is Europe/Berlin. */ - val tanExpirationTime: LocalDateTime? = null, + val tanExpirationTime: Instant? = null, val challengeCreationTimestamp: Instant = Instant.nowExt() ) { diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/ResponseParser.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/ResponseParser.kt index a56494d4..3116e77a 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/ResponseParser.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/ResponseParser.kt @@ -1,9 +1,7 @@ package net.codinux.banking.fints.response -import kotlinx.datetime.LocalDate -import kotlinx.datetime.LocalDateTime -import kotlinx.datetime.LocalTime -import kotlinx.datetime.atTime +import kotlinx.datetime.* +import net.codinux.banking.fints.extensions.EuropeBerlin import net.codinux.log.logger import net.codinux.banking.fints.log.IMessageLogAppender import net.codinux.banking.fints.messages.Separators @@ -577,7 +575,7 @@ open class ResponseParser( if (dataElementGroups.size > 3) parseStringToNullIfEmpty(dataElementGroups[3]) else null, if (dataElementGroups.size > 4) parseStringToNullIfEmpty(dataElementGroups[4]) else null, binaryChallengeHHD_UC?.let { extractBinaryData(it) }, - if (dataElementGroups.size > 6) parseNullableDateTime(dataElementGroups[6]) else null, + if (dataElementGroups.size > 6) parseNullableDateTime(dataElementGroups[6])?.toInstant(TimeZone.EuropeBerlin) else null, if (dataElementGroups.size > 7) parseStringToNullIfEmpty(dataElementGroups[7]) else null, segment ) diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/segments/TanResponse.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/segments/TanResponse.kt index 13be5d9c..3fab5a69 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/segments/TanResponse.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/response/segments/TanResponse.kt @@ -1,6 +1,6 @@ package net.codinux.banking.fints.response.segments -import kotlinx.datetime.LocalDateTime +import kotlinx.datetime.Instant import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanProcess @@ -37,7 +37,7 @@ open class TanResponse( * * In server's time zone, that is Europe/Berlin. */ - val tanExpirationTime: LocalDateTime?, + val tanExpirationTime: Instant?, val tanMediaIdentifier: String? = null, // M: bei TAN-Prozess=1, 3, 4 und „Anzahl unterstützter aktiver TAN-Medien“ nicht vorhanden. O: sonst segmentString: String