Skip to content

Commit

Permalink
Ensure TIMESTAMP presents date-time in English locale format for SRP …
Browse files Browse the repository at this point in the history
…authentication (#45)
  • Loading branch information
vparashchak authored Oct 23, 2023
1 parent f783467 commit 3065df3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public extension CognitoAuthenticatable {
// cognito expects the dateformat to have the timezone as UTC
dateFormatter.dateFormat = "EEE MMM d HH:mm:ss 'UTC' yyyy"
dateFormatter.timeZone = TimeZone(identifier: "UTC")
// cognito expects the dateformat to be in English
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
let timestamp = dateFormatter.string(from: Date())

// construct claim
Expand Down

0 comments on commit 3065df3

Please sign in to comment.