I have a migration that is successful except for the timezone.
For some reason the above code causes a timezone conversion to happen between the source date and the destination timezone. The migration seems to assume the source is in UTC and needs converted to Chicago time, giving me a result that's six hours later than it should be. The source date is in fact from the same timezone, so I want to avoid converting it.
$this->addFieldMapping('dest_date', 'source_date') ->arguments(DateMigrateFieldHandler::arguments('America/Chicago', 'America/Chicago'));
The above code works perfectly, but when I run my migration I get this error:
The field mapping arguments() method is now deprecated - please use subfield notation instead.
However when I try to use subfield notation, I end up with the same problem again that I did when I had no arguments/subfields at all:
$this->addFieldMapping('dest_date', 'source_date'); $this->addFieldMapping('dest_date:timezone', 'source_date:timezone');
The above code doesn't seem to help at all, (edit: This is not surprising, as my field doesn't seem to have "timezone" as a subfield.) and the migration still seems to assume the source is in UTC and needs converted to Chicago time.
How do I convert my arguments to subfield notation without breaking them?