Skip to content

Commit

Permalink
SP-70 Ändring av format för timeZoneOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
mbalsiger committed Sep 6, 2024
1 parent 66eb484 commit dbc97a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ extension TimeZone {
localTimeZoneFormatter.dateFormat = "Z"
return localTimeZoneFormatter.string(from: Date())
}

func minutesFromGMT() -> String {
let minutes = (secondsFromGMT() / 60)
return String(minutes)
}
}
4 changes: 2 additions & 2 deletions SwedbankPaySDK/Classes/Api/SwedbankPayAPIEnpointRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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):
Expand Down

0 comments on commit dbc97a9

Please sign in to comment.