Feeds date mapper correctly maps the date:start value but converts the date:end value to GMT. i also noticed that the date:end feeds mapper does not have configuration settings like the date:start mapper.

To reproduce, create a content with start and end dates, export in CSV format and import into another site using feeds. Make sure to Map the start and end dates from the CSV export into the date:start and date:end fields of the feeds mapper, and import the content. start date displays correctly as the original while end date displays in GMT (UTC) time.

1. Site regional settings are set correctly to my local timezone
2. Date field should be set to collect end date. No time conversion or site default should be set for the date field

I solved this the dirty way by replacing all the 4 instances of the UTC timezone to my local timezone, on lines 98, 109, 144 and 147 and maps correctly now for my use case.

Comments

itpromanager created an issue. See original summary.

smartsystems160’s picture

Title: Feeds Date Mapper does not map date:end correctly after importation » Feeds Date Mapper does not map date:end correctly after import
megachriz’s picture

Status: Active » Needs review
StatusFileSize
new552 bytes

I see that there is indeed no mapping config available for the end date target. I've added that in the attached patch. Quickly tested it and it seems to fix the problem.

megachriz’s picture

StatusFileSize
new5.98 KB

Now with an automated test.

  • MegaChriz committed 68aec0d on 7.x-2.x
    Issue #2790741 by MegaChriz: added timezone option for date:end.
    
megachriz’s picture

Status: Needs review » Fixed

Great, the test passes.

Committed #4.

smartsystems160’s picture

Status: Fixed » Closed (fixed)

I can confirm that this works without issues. Thank you