Question
Date Header Feature: Regional Time Zones Not Represented
Dev Orbit
0 reputation · 06 Feb 2025, 04:56 UTC
130K views0
Issue
The Ktor Date feature injects a Date header using RFC 1123 formatting. Internally it relies on HttpDate, which always emits a GMT string, converting any supplied ZonedDateTime to UTC before formatting.
Unresolved Decision
There is no documented option to preserve a regional time zone or customize the formatter. Developers who need to expose local time in the header face an uncertainty: should the feature be extended, or is the UTC-only implementation sufficient?
Questions
- Can Ktor be extended to output a
Dateheader in a specified regional time zone? - What impact would a non-UTC Date header have on HTTP caching and conditional requests?
- Is there a way to override the default formatter to preserve local time while maintaining RFC 1123 compliance?