Skip to content

Commit dc0c463

Browse files
committed
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
1 parent 83bbf16 commit dc0c463

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spring-web/src/main/java/org/springframework/http/HttpHeaders.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.time.Duration;
2828
import java.time.Instant;
2929
import java.time.ZoneId;
30-
import java.time.ZoneOffset;
3130
import java.time.ZonedDateTime;
3231
import java.time.format.DateTimeFormatter;
3332
import java.time.format.DateTimeParseException;
@@ -415,7 +414,7 @@ public class HttpHeaders implements Serializable {
415414

416415
private static final DecimalFormatSymbols DECIMAL_FORMAT_SYMBOLS = new DecimalFormatSymbols(Locale.ROOT);
417416

418-
private static final ZoneId GMT = ZoneOffset.UTC;
417+
private static final ZoneId GMT = ZoneId.of("GMT");
419418

420419
/**
421420
* Date formats with time zone as specified in the HTTP RFC to use for formatting.

0 commit comments

Comments
 (0)