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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 506792_date_mapper_tz.patch | 379 bytes | Arto |
Comments
Comment #1
Arto commentedComment #2
Arto commentedTo clarify the logic: if a datetime has, say, a TZ offset of UTC+2, then adjusting it by +2h (as
mappers/feedapi_mapper_date.inccurrently 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.
Comment #3
Arto commentedGuys, 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.
Comment #4
alex_b commentedSorry for delay. Committed to 1.x and 2.x. This is part of the Beta 12 release: http://drupal.org/node/522420
Thank you.