Hi,

I have a feed that creates dates and I have the well known timezone problem where feeds converts the date to GMT rather than taking it as it is..

Since we are closing in on the time change date this issue has reared it head again for us.. I thought I might try and create a rule to subtract the hour that feeds is adding.. So I setup a rule to act "Before saving an item imported via.." and then use "Set Data Value" to change the time by 1 hour for the date field..

Unfortunately I can't seem to get it to work..

Is it possible to manipulate the data being imported with rules before saving the content? If so how could it be done?

Thanks

Comments

lzimmerman’s picture

Component: Feeds Import » Code

Hi,

Yes, I have just tested this and it is possible to use Rules to change the value of a date field.

  1. Create Rule with Event: "Before saving an item imported via [feedname]."
  2. Add action: "Set a data value"
  3. Select date field value: e.g. "node:field-date-datefield:0"
  4. Select new value: use the same value, e.g. "node:field-date-datefield:0"
  5. Add offset: e.g. "5 Hours" (value may be positive or negative)
  6. Save action.

This should update a date field for each feed item on import, and can counteract timezone problems.

twistor’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

We've rewritten the date time handling, so this should be fixed.