jakartaee / jakartaee/mail-api
Default MailDateFormat pattern might not be compatible with RFC 2822?
- Dominant language
- Java
- Stars
- 285
- Forks
- 109
- Avg merge
- 15h 19m
- Merged PRs (30d)
- 1
Description
https://github.com/jakartaee/mail-api/blob/d93e2fd55f7d1ac1037c656518e0ec71a047cea1/api/src/main/java/jakarta/mail/internet/MailDateFormat.java#L127
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.
Contributor guide
Research direction
Start with the default pattern in api/src/main/java/jakarta/mail/internet/MailDateFormat.java at the linked line. Compare its generated Date header with RFC 2822 and verify that the resulting output no longer includes the parenthesized timezone, using any existing MailDateFormat coverage you find.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100