Files
floci/src/test/java
Kenshin Okinaka 523003972e fix(apigateway): format request times with an English locale (#5093)
* fix(apigateway): format request times with an English locale

The REST requestTime, the HTTP API requestContext.time and the Lambda
function URL requestContext.time were formatted with
"dd/MMM/yyyy:HH:mm:ss Z" under the JVM default locale, so on a
non-English machine the month came out localized (e.g. "10月"). A REST
context mapping forwards that value into an integration request header,
where the JDK HTTP client rejected it and the call failed with 500.

Pin the formatters to Locale.ENGLISH, as the WebSocket event builder
already does, and have the HTTP API proxy and authorizer events reuse
the shared formatter in UTC instead of the system time zone.

* test(apigateway): cover HTTP API event times under a non-UTC host

Build the HTTP API proxy and REQUEST authorizer events under a Japanese
default locale and an Asia/Tokyo default time zone, and assert that
requestContext.time has an English month, a +0000 offset and the same
instant as timeEpoch. buildRequestAuthorizerEventV2 becomes
package-private so the test can reach it.
2026-10-05 10:08:38 -04:00
..