Score:-1

Migrating date into drupal datetime field

za flag

i am having the xml selector

<starting_date><![CDATA[ 2017-01-01 22:34:56 +0100 ]]></starting_date>

this migration process fails :

process:
  field_job_starting_date:
    plugin: format_date
    source: starting_date
    from_format: 'Y-m-j H:i:s Z'
    to_format: 'Y-m-d\TH:i:s'
    to_timezone: 'Europe/Paris'

How can i fix it ?

Score:0
za flag

it was to import into a drupal datetime field

process:
  field_job_starting_date:
    plugin: format_date
    from_format: 'Y-m-d H:i:s O'
    to_format: 'Y-m-d\TH:i:s'
    to_timezone: 'UTC'
    source: starting_date

https://understanddrupal.com/articles/migrating-dates-drupal

The dates are stored in drupal as UTC

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.