I'm using format_date process plugin to import data from external API to drupal 8 node. The date/time in API is "Asia/Jerusalem" time - 2017-06-24 20:52:55 The date/time from the API is saved in drupal node as it was a UTC 2017-06-24T20:52:55 When the node is displayed (I have "Asia/Jerusalem" timezone defined for me) it shows 2017-06-24 23:52:55

This is the configuration file I used

      name: status_updated
      label: 'Status updated'
      selector: status_updated  
  plugin: 'entity:node'
    plugin: format_date
    from_format: 'Y-m-d H:i:s'
    to_format: 'Y-m-d\TH:i:s'
    #timezone: 'Asia/Jerusalem'
     validate_format: false       
    source: status_updated  

I need either to convert the source date first from "Asia/Jerusalem" to "UTC" and then pass it to format_date or change the configuration file in way that it will save the date as 2017-06-24T17:52:55so for users with timezone "Asia/Jerusalem" it will show the correct date/time 2017-06-24 20:52:55

How can I achieve it? removing the comment for timezone: 'Asia/Jerusalem' not helped


Timezone conversion is not yet supported - the issue where it's being developed is https://www.drupal.org/node/2883892.

  • Thank you. The issue helped me to write my own process plugin based on format date plugin until it will be supported in core.
    – Igal
    Jul 1 '17 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.