I get this message for each migrated date:

Undefined index: timezone File [...]\sites\all\modules\date\date.field.inc, line 375(file: [...]\sites\all\modules\date\date.field.inc, line 375)

Dates look correctly imported though.

The timezone sub-field is mapped this way in my class:

<?php
    $this->addFieldMapping('field_event_date', 'field_event_date');
    $this->addFieldMapping('field_event_date:timezone')->defaultvalue('Europe/Paris');
    $this->addFieldMapping('field_event_date:to', 'field_event_date:value2');
?>

I use:
migrate_d2d 7.x-2.1-rc1+7-dev
migrate 7.x-2.7-rc1
date 7.x-2.9-beta2

Comments

mikeryan’s picture

Project: Drupal-to-Drupal data migration » Date
Status: Active » Closed (duplicate)
Related issues: +#2408093: migration doesn't set the timezone

The problem is actually in the Date module - there's an existing issue and patch: #2408093: migration doesn't set the timezone

anrikun’s picture

Thanks for the info @mikeryan!