Closed m1st3rnutso closed 5 years ago
Hi @m1st3rnutso, thanks for the report. What do you mean by time zone change? https://www.timeanddate.com/time/gmt-utc-time.html https://www.timeanddate.com/time/aboututc.html
Closed. Please reopen if the problem is active.
Ktor Version
1.2.0-rc2
Ktor Engine Used(client or server and name)
Netty
JVM Version, Operating System and Relevant Context
11.0.2, Windows 10 Pro 64 bit
Feedback
https://github.com/ktorio/ktor/blob/1e29f25545ec6e366426e1bdfa682d5072246f48/ktor-server/ktor-server-core/jvm/src/io/ktor/features/DefaultHeaders.kt#L24
The time is initially GMT upon instantiation, but then becomes UTC when now() is called. Why isn't time instantiated using the now() method?
Now() Method: https://github.com/ktorio/ktor/blob/1e29f25545ec6e366426e1bdfa682d5072246f48/ktor-server/ktor-server-core/jvm/src/io/ktor/features/DefaultHeaders.kt#L47
But then the now().toHttpDateString() forces back to GMT? https://github.com/ktorio/ktor/blob/1e29f25545ec6e366426e1bdfa682d5072246f48/ktor-server/ktor-server-core/jvm/src/io/ktor/features/DefaultHeaders.kt#L61
Looking for some clarification on inconsistent time zone usage.