View | Details | Raw Unified | Return to bug 57678
Collapse All | Expand All

(-)src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java (-1 / +4 lines)
Lines 77-83 Link Here
77
               Matcher m = datePatern.matcher(dateS);
77
               Matcher m = datePatern.matcher(dateS);
78
               if(m.matches()) {
78
               if(m.matches()) {
79
                  date = Calendar.getInstance();
79
                  date = Calendar.getInstance();
80
                  date.set(Calendar.YEAR,  Integer.parseInt(m.group(1)) + 2000);
80
81
                  int year = Integer.parseInt(m.group(1));
82
                  date.set(Calendar.YEAR,  year + (year < 80 ? 1900 : 2000));
83
81
                  date.set(Calendar.MONTH, Integer.parseInt(m.group(2)) - 1); // Java is 0 based
84
                  date.set(Calendar.MONTH, Integer.parseInt(m.group(2)) - 1); // Java is 0 based
82
                  date.set(Calendar.DATE,  Integer.parseInt(m.group(3)));
85
                  date.set(Calendar.DATE,  Integer.parseInt(m.group(3)));
83
                  date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(m.group(4)));
86
                  date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(m.group(4)));
(-)src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java (+2 lines)
Lines 41-46 Link Here
41
      
41
      
42
      suite.addTestSuite(TestPOIFSChunkParser.class);
42
      suite.addTestSuite(TestPOIFSChunkParser.class);
43
43
44
      suite.addTestSuite(TestMessageSubmissionChunkY2KRead.class);
45
44
      return suite;
46
      return suite;
45
   }
47
   }
46
}
48
}

Return to bug 57678