[GH-ISSUE #95] [Bug] When year in Date: field is two digits (YY), the e-mail remains always on top, not sorted correctly #83

Closed
opened 2026-03-03 01:19:40 +03:00 by kerem · 2 comments
Owner

Originally created by @krackout on GitHub (Feb 15, 2022).
Original GitHub issue: https://github.com/d99kris/nmail/issues/95

Originally assigned to: @d99kris on GitHub.

I've recently received an e-mail with this date field:
Date: 13 Feb 22 00:04 EST

This is shown in list of mails as 22-02-13 and sorted always on top, even before today's e-mails which show only time and not date.

Personally I think there shouldn't be YY dates on headers, so perhaps the proper thing to do is to mention the problem to the sender of such mails; I'm reporting it in case it's easy to be solved. It seems that forcing YYYY is neglected, forgetting '00 issues.

scrot-nmail

Originally created by @krackout on GitHub (Feb 15, 2022). Original GitHub issue: https://github.com/d99kris/nmail/issues/95 Originally assigned to: @d99kris on GitHub. I've recently received an e-mail with this date field: `Date: 13 Feb 22 00:04 EST` This is shown in list of mails as 22-02-13 and sorted always on top, even before today's e-mails which show only time and not date. Personally I think there shouldn't be YY dates on headers, so perhaps the proper thing to do is to mention the problem to the sender of such mails; I'm reporting it in case it's easy to be solved. It seems that forcing YYYY is neglected, forgetting '00 issues. ![scrot-nmail](https://user-images.githubusercontent.com/36501063/154049249-06e651d1-7a4e-4b64-ae8d-ac1f09865699.png)
kerem closed this issue 2026-03-03 01:19:40 +03:00
Author
Owner

@d99kris commented on GitHub (Feb 15, 2022):

Hi @krackout - thanks for reporting the issue. I manually created an email message with that timestamp and I can reproduce the problem. I'll try see if this can be fixed in nmail.

<!-- gh-comment-id:1040184116 --> @d99kris commented on GitHub (Feb 15, 2022): Hi @krackout - thanks for reporting the issue. I manually created an email message with that timestamp and I can reproduce the problem. I'll try see if this can be fixed in nmail.
Author
Owner

@d99kris commented on GitHub (Feb 15, 2022):

I've implemented a fix for this issue in above commit.

However, in order for it to work one needs to delete old cached headers that might've been parsed wrongly using a previous nmail version. This can be done with:

rm -rf ~/.nmail/cache/headers

Normally when fixing parsing errors in nmail the cache version number is bumped, invalidating existing caches. But I feel receiving emails with this type of timestamp is not a common problem, thus the manual clearing of headers cache is required this time.

<!-- gh-comment-id:1040290843 --> @d99kris commented on GitHub (Feb 15, 2022): I've implemented a fix for this issue in above commit. However, in order for it to work one needs to delete old cached headers that might've been parsed wrongly using a previous nmail version. This can be done with: ```rm -rf ~/.nmail/cache/headers``` Normally when fixing parsing errors in nmail the cache version number is bumped, invalidating existing caches. But I feel receiving emails with this type of timestamp is not a common problem, thus the manual clearing of headers cache is required this time.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#83
No description provided.