In #831470: Import fails due to dates not converted correctly a patch was added to the feeds module (drupal 6 version) and in #987206: strtotime() in class FeedsDateTime breaks dates before 1901 an improvement of that patch is waiting to be added. Neither of these patches seem to have made it to the drupal 7 version. I tested the #987206: strtotime() in class FeedsDateTime breaks dates before 1901 patch and it worked as a charm for 7.x-2.0-alpha3. Even though comment #25 of that first issue states that the patch was ported to the drupal 7 branch, I don't see it there. So my question is: Please port this patch to 7.x version :-)
Comment | File | Size | Author |
---|---|---|---|
#2 | port_date_mapper_patch-1058424-2.patch | 1.4 KB | thijsvdanker |
Comments
Comment #1
jay-dee-ess CreditAttribution: jay-dee-ess commentedSubscribe
Comment #2
thijsvdanker CreditAttribution: thijsvdanker commentedI've ported the patch from #987206: strtotime() in class FeedsDateTime breaks dates before 1901 to Drupal 7 and added a line to the test file to validate it.
Comment #3
thijsvdanker CreditAttribution: thijsvdanker commentedComment #4
thijsvdanker CreditAttribution: thijsvdanker commentedComment #6
thijsvdanker CreditAttribution: thijsvdanker commentedTest was run against the alpha3 branch. Testbot please retest :)
Comment #8
thijsvdanker CreditAttribution: thijsvdanker commentedPatch is green, could use a manual review here :)
Comment #9
MegaChriz CreditAttribution: MegaChriz commentedPossible related issue in Migrate #1708296: Avoid Dec 13 1901 problem in strtotime..
Comment #10
MegaChriz CreditAttribution: MegaChriz commentedClarifying issue title.
Comment #11
internal CreditAttribution: internal commentedI think the fix of Migrate module is clean, is it good for Feeds?
Comment #12
MegaChriz CreditAttribution: MegaChriz commentedThe patch in #2 might be better, but I don't know enough about DateTime in PHP to be sure. The code changes are inside the FeedsDateTime class, which extends DateTime. I added the Migrate issue because it was mentioned in #2426433: import date field limited from 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 which I closed as duplicate of this issue.
Comment #13
internal CreditAttribution: internal commentedI applied #2 patch and works well by now. I think it's safe to commit to the module code.
Comment #15
twistor CreditAttribution: twistor commented