Keep using ZoneId.of("GMT") in HttpHeaders

Otherwise some header values are changed from "GMT" to "Z" and
some tests are broken. We don't want to change the current
runtime behavior, so this commit reverts the related change to
keep using ZoneId.of("GMT") in HttpHeaders.

Closes gh-35861
This commit is contained in:
Sébastien Deleuze
2025-11-26 10:22:15 +01:00
parent 83bbf16e6c
commit dc0c463137
@@ -27,7 +27,6 @@ import java.text.DecimalFormatSymbols;
import java.time.Duration;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
@@ -415,7 +414,7 @@ public class HttpHeaders implements Serializable {
private static final DecimalFormatSymbols DECIMAL_FORMAT_SYMBOLS = new DecimalFormatSymbols(Locale.ROOT);
private static final ZoneId GMT = ZoneOffset.UTC;
private static final ZoneId GMT = ZoneId.of("GMT");
/**
* Date formats with time zone as specified in the HTTP RFC to use for formatting.