|
private static final String PATTERN = "EEE, d MMM yyyy HH:mm:ss Z (z)"; |
I think the (z) part is incorrect and should be removed according to RFC 2822.
Currently this generates Date headers like this one:
Date: Sun, 7 Dec 2025 15:58:53 +0100 (GMT+01:00)
But the last part between parenthesis is not part of the RFC, and parsing it with some software will fail (for example with PHP) as it specifies two timezones.