Open Bug 266107 Opened 20 years ago Updated 2 months ago

DATE header misparsed: "Mar" (Day of Week) interpreted as "March", "Oct" field is ignored

Categories

(MailNews Core :: Backend, defect)

defect

Tracking

(Not tracked)

People

(Reporter: tbertels+bugzilla, Unassigned)

References

Details

(Keywords: intl, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla Thunderbird 0.8 (20040913)(Windows; U; Windows NT 5.1; rv:1.7.3)

I've received a message today (26/10/2004 in DD/MM/YYYY) and Thunderbird says me
it was sent the 26/10/2004. The problem comes from the source code: the DATE
attribute is "DATE: mar., 26 oct 2004 06:24:08". It seems it has been bad
generated: "mar." has been used for the day Tuesday instead of "Tue". But
Thunderbird should now that the DATE attribute must be interpreted as [day
short], [n°of day] [month short] [year] [hour]. Thunderbird believe "mar." is
the month but it can't, it's just the day in italian (martedì).

Reproducible: Didn't try
Steps to Reproduce:
(In reply to comment #0)
> I've received a message today (26/10/2004 in DD/MM/YYYY) and Thunderbird
> [tells] me it was sent the 26/10/2004.
                             ^^^^^^^^^^  -- what did you actually mean here?
I mean the 26/10/2004 (DD/MM/YYYY).
Sorry, it's a mistake.
I mean the 26/03/2004 (DD/MM/YYYY).
             ^^^^  --- (March)
The date is also misparsed if the period is left off the day abbreviation:
  Date: mar, 26 oct 2004 06:24:08

The comma ought to be sufficient to indicate that the "mar" should be discarded.

Reproduced with TB 1.0 and Moz 1.8a6, Win2K.
Assignee: mscott → sspitzer
Status: UNCONFIRMED → NEW
Component: General → MailNews: Backend
Ever confirmed: true
Keywords: intl
OS: Windows XP → All
Product: Thunderbird → Core
Hardware: PC → All
Summary: DATE attribute in source code bad interpreted when shown in the GUI → DATE header misparsed: "Mar" (Day of Week) interpreted as "March", "Oct" field is ignored
Version: unspecified → Trunk
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
QA Contact: backend
Product: Core → MailNews Core

Thomas, does this still reproduce for you?

Severity: normal → S4
Flags: needinfo?(tbertels+bugzilla)
Attached file testcase.eml

Yes, still reproduceable on latest nightly.

Here's a minimized testcase.

Flags: needinfo?(tbertels+bugzilla)
Keywords: testcase
Duplicate of this bug: 462033

See also bug 462033 comment 6
Current link to code: https://searchfox.org/mozilla-central/source/nsprpub/pr/src/misc/prtime.c#945 (PR_ParseTimeStringToExplodedTime)

The code in question is most likely

case 'm': case 'M':
   if (month == TT_UNKNOWN &&
      (rest[1] == 'a' || rest[1] == 'A') &&
      (rest[2] == 'r' || rest[2] == 'R')) {
      month = TT_MAR;
   }
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: