When a feed has non-UTC datetimes (e.g. "2009-03-24T16:03:00+01:00"), the Date mapper is currently adjusting these datetimes in the wrong direction based on the time zone offset given in the feed element. The attached single-line patch fixes this issue.

CommentFileSizeAuthor
#1 506792_date_mapper_tz.patch379 bytesArto

Comments

Arto’s picture

StatusFileSize
new379 bytes
Arto’s picture

To clarify the logic: if a datetime has, say, a TZ offset of UTC+2, then adjusting it by +2h (as mappers/feedapi_mapper_date.inc currently does) doesn't reset it back to UTC but rather makes UTC+4, which is clearly incorrect.

Thus, the adjustment must actually be performed as the opposite of the TZ sign; that is, in the case above the date must be adjusted by -2h. The attached patch, in my previous comment, takes care of this.

Arto’s picture

Guys, any chance of getting this one-line fix committed, please? We're having to repeatedly patch this downstream when we import new revisions of Feed Element Mapper.

alex_b’s picture

Status: Reviewed & tested by the community » Fixed

Sorry for delay. Committed to 1.x and 2.x. This is part of the Beta 12 release: http://drupal.org/node/522420

Thank you.

Status: Fixed » Closed (fixed)
Issue tags: -date

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