diff --git a/Sources/SotoCognitoAuthenticationSRP/Authenticatable+SRP+async.swift b/Sources/SotoCognitoAuthenticationSRP/Authenticatable+SRP+async.swift index b6e19b9..c9cc8c9 100644 --- a/Sources/SotoCognitoAuthenticationSRP/Authenticatable+SRP+async.swift +++ b/Sources/SotoCognitoAuthenticationSRP/Authenticatable+SRP+async.swift @@ -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