diff --git a/SwedbankPaySDK/Classes/Api/Helpers/TimeZone+OffsetFromGMT.swift b/SwedbankPaySDK/Classes/Api/Helpers/TimeZone+OffsetFromGMT.swift index 254de26..4d9f6814 100644 --- a/SwedbankPaySDK/Classes/Api/Helpers/TimeZone+OffsetFromGMT.swift +++ b/SwedbankPaySDK/Classes/Api/Helpers/TimeZone+OffsetFromGMT.swift @@ -22,4 +22,9 @@ extension TimeZone { localTimeZoneFormatter.dateFormat = "Z" return localTimeZoneFormatter.string(from: Date()) } + + func minutesFromGMT() -> String { + let minutes = (secondsFromGMT() / 60) + return String(minutes) + } } diff --git a/SwedbankPaySDK/Classes/Api/SwedbankPayAPIEnpointRouter.swift b/SwedbankPaySDK/Classes/Api/SwedbankPayAPIEnpointRouter.swift index 093216e..d422c0d 100644 --- a/SwedbankPaySDK/Classes/Api/SwedbankPayAPIEnpointRouter.swift +++ b/SwedbankPaySDK/Classes/Api/SwedbankPayAPIEnpointRouter.swift @@ -81,7 +81,7 @@ struct SwedbankPayAPIEnpointRouter: EndpointRouterProtocol { "screenColorDepth": String(24)], "browser": ["acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "languageHeader": Locale.current.identifier.replacingOccurrences(of: "_", with: "-"), - "timeZoneOffset": TimeZone.current.offsetFromGMT(), + "timeZoneOffset": TimeZone.current.minutesFromGMT(), "javascriptEnabled": true], "service": ["name": "SwedbankPaySDK-iOS", "version": SwedbankPaySDK.VersionReporter.currentVersion] @@ -97,7 +97,7 @@ struct SwedbankPayAPIEnpointRouter: EndpointRouterProtocol { "screenColorDepth": String(24)], "browser": ["acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "languageHeader": Locale.current.identifier.replacingOccurrences(of: "_", with: "-"), - "timeZoneOffset": TimeZone.current.offsetFromGMT(), + "timeZoneOffset": TimeZone.current.minutesFromGMT(), "javascriptEnabled": true] ] case .completeAuthentication(let cRes):