Bug 57678

Summary: [PATCH] Incorrect year parsing in message submission chunk
Product: POI Reporter: Adrian Conlon <adrian.conlon>
Component: HSMFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: 3.10-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: Generated using "ant -f patch.xml"
Generated using "ant -f patch.xml"
Updated patch for problem

Description Adrian Conlon 2015-03-09 12:21:30 UTC
Created attachment 32551 [details]
Generated using "ant -f patch.xml"

Some messages sent before the year 2000 are being parsed (incorrectly!) as having been sent in the future.

For the test case I'm interested in, some emails actually sent in the year 1999 are shown as having been sent in the year 2099.
Comment 1 Adrian Conlon 2015-03-09 12:22:30 UTC
Created attachment 32552 [details]
Generated using "ant -f patch.xml"

Second part of the patch, includes test data.
Comment 2 Adrian Conlon 2015-03-09 13:01:15 UTC
I forgot to note: patch applies to "trunk".
Comment 3 Adrian Conlon 2015-03-18 15:16:12 UTC
The message submission chunk as extracted by POI HSMF appears to be:

PR_MESSAGE_SUBMISSION_ID/PidTagMessageSubmissionId

Documented here ([MS-OXOMSG] Section 2.2.1.79)
https://msdn.microsoft.com/en-us/library/hh369838(v=exchg.80).aspx

Effectively, it appears as though this property shouldn't be interpreted to extract a date.  Perhaps the solution would be to ignore the message submission chunk (at least in terms of date/time extraction).
Comment 4 Adrian Conlon 2015-03-23 11:26:43 UTC
Created attachment 32590 [details]
Updated patch for problem

Corrects a less/greater than mix up (sorry Nick, you were right to question that one!).

Replaces one test case with three cases covering the transition around the pivot year (1980).

Patch seems (to me) to be in a better format.

N.B.
The test cases are *manually* hacked using MFCMapi.  No emails I send (using Outlook/Exchange) include the PR_MESSAGE_SUBMISSION_ID.
Comment 5 Dominik Stadler 2015-07-03 10:33:51 UTC
Applied via r1688993, hopefully this code will get revised before 2080 when this would start to fail...