Skip to content

broken date headers are interpreted badly #252

@eMBee

Description

@eMBee

this is different from missing a date at all, which is only a problem at import but not at day to day use.

after importing a million messages i am now not only facing a dozen threads that are stuck to the top of my inbox because they have a date in the future, but worse some of those dates are different from the date in the actual email, and i don't know how many threads i am not seeing with wrong dates in the past.

this can be dangerous if i am not seeing new incoming mails because they get assigned a date in the past.
it is the reason for me to sort my mails by the date received and simply ignore the actual Date header. (but that's a different issue)

here is a list of date interpretations:

Date: l\xf6r, 29 maj 1999 00:24:04 +0200 (CEST)  ->  March 28 2014 11:24PM -> in index shown as: Yest.11pm
Date: fre, 28 maj 1999 21:47:11 +0200 (CEST)     ->  March 28 2014  8:47PM -> shown as: Yest. 9pm
Date: ons, 26 maj 1999 11:00:34 +0200 (CEST)     ->  March 26 2014 10:00AM  -> shown as: Yest.10am
Date: Di, 17 Mai 2005 12:31:00 0200              ->  March 17 2014 12:31PM   -> shown as: Yest. 1pm

what's further unusual is that in the index the date is shown as yesterday, despite being a date in the future.

in defence of the date handling code, i don't know how someone could have thought that localizing the Date: header would be a smart idea, so i am not surprised, that the parser falls over. but there is a difference between not being able to read a date, and reading it wrongly. i don't think there is any point in trying to get these dates right. i'd consider them unparseable and treat them just like mails with the date missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions