Skip to content

Default MailDateFormat pattern might not be compatible with RFC 2822? #820

@bohwaz

Description

@bohwaz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions