Skip to content

RFC 1123 Formatter does not pad zero as required by spec #564

@mikedawson

Description

@mikedawson

RFC 1123 date format requires two digits for the day of the month as I understand from https://datatracker.ietf.org/doc/html/rfc822#section-5.1 . DateTimeComponents.Formats.RFC_1123 is not padding the day for days 1-9.

e.g.

val instant01Aug2025 = Instant.fromEpochSeconds(1754069088).format(DateTimeComponents.Formats.RFC_1123)        

Expected : Fri, 01 Aug 2025 17:24:48 GMT
Actual: Fri, 1 Aug 2025 17:24:48 GMT

I have a test for an http function that uses ktor server's ConditionalHeaders (to validate my component handles HTTP 304 correctly) . All of a sudden it started failing today (1/Aug), even though no code or versions had been changed. It seems to be failing because of the RFC_1123 formatter.

Metadata

Metadata

Labels

invalidThis doesn't seem right

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions