Hi Federico, Updated set of patches is pushed with an additional test.
One weird issue: void DateTest::testParseDateInvalid() { PdfString tmp("D:2012020"); PdfDate date(tmp); struct tm _tm; memset (&_tm, 0, sizeof(struct tm)); const time_t t = date.GetTime(); localtime_r(&t, &_tm); CPPUNIT_ASSERT_EQUAL(false, date.IsValid()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Year", 1970, _tm.tm_year + 1900); CPPUNIT_ASSERT_EQUAL_MESSAGE("Month", 1, _tm.tm_mon + 1); CPPUNIT_ASSERT_EQUAL_MESSAGE("Day", 1, _tm.tm_mday); CPPUNIT_ASSERT_EQUAL_MESSAGE("Hour", 0, _tm.tm_hour); CPPUNIT_ASSERT_EQUAL_MESSAGE("Minute", 59, _tm.tm_min); // Why 59 and not 0? CPPUNIT_ASSERT_EQUAL_MESSAGE("Second", 59, _tm.tm_sec); // Why 59 and not 0? } Any quick ideas why we get 59 here and not 0? Best regards, Dominik On Wed, Jan 6, 2021 at 10:18 PM Dominik Seichter <domseich...@googlemail.com> wrote: > Allright, let me revert my commit and apply your latest set of patches. > > Br > Dominik > > Federico Kircheis <federico.kirch...@gmail.com> schrieb am Mi., 6. Jan. > 2021, 22:14: > >> On 06/01/2021 20.21, Dominik Seichter wrote: >> > Sorry, now I missed this mail while working on your previous mail and >> patch! >> >> NP. >> >> > >> > Could you please check the current state in SVN? >> > I think the date handling after your previous patch was ok - do you >> agree? >> >> After the previous mail I thought that D:2012<garbage> gets parsed as >> 2012... so an error is IMHO better. >> >> I also do not think there are really documents that use something like >> D:20120 instead of D:2012 or D:201201 as valid date on purpose... >> >> > Can you send a patch only for the PdfDate clean up please? >> >> You mean without adding the error-detection? >> >> Can do it. >> If you take the part with the tests out it should already apply cleanly, >> as I worked on the patch sent previously (I did not see changes on your >> side on PDFDate, but could have missed them). >> >> > >> > Thanks, >> > Dominik >> > >> >> Federico >> >
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users