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 :-)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jay-dee-ess’s picture

Subscribe

thijsvdanker’s picture

I'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.

thijsvdanker’s picture

Status: Active » Needs review
thijsvdanker’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev

Status: Needs review » Needs work

The last submitted patch, 2: port_date_mapper_patch-1058424-2.patch, failed testing.

thijsvdanker’s picture

Status: Needs work » Needs review

Test was run against the alpha3 branch. Testbot please retest :)

thijsvdanker’s picture

Patch is green, could use a manual review here :)

MegaChriz’s picture

Possible related issue in Migrate #1708296: Avoid Dec 13 1901 problem in strtotime..

MegaChriz’s picture

Title: Port date mapper patch to d7 version » Port date mapper patch to d7 version to support dates before 13 Dec 1901

Clarifying issue title.

internal’s picture

I think the fix of Migrate module is clean, is it good for Feeds?

MegaChriz’s picture

The 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.

internal’s picture

I applied #2 patch and works well by now. I think it's safe to commit to the module code.

  • twistor committed b244c04 on 7.x-2.x authored by thijsvdanker
    Issue #1058424 by thijsvdanker: Port date mapper patch to d7 version to...
twistor’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.