$entry->postDate = is_null($data['postDate']) ? '' : new DateTime($data['postDate']['date'], new DateTimeZone($data['postDate']['timezone']));
$entry->expiryDate = is_null($data['expiryDate']) ? '' : new DateTime($data['expiryDate']['date'], new DateTimeZone($data['expiryDate']['timezone']));
I’ve also just updated DateTimeHelper::toDateTime() to support passing in PHP DateTime arrays like the above (craftcms/cms@ad2f39e84654550db8b69a7d39cbf88928cdd4af), so alternatively your next release could require "craftcms/cms": "^3.2.6" and do this instead:
These lines:
https://github.com/dgrigg/craft-migration-assistant/blob/4a9ceff667cb183b96322824df003b0374b9e81d/src/services/EntriesContent.php#L145-L146
Should be accounting for the timezone stored in the array:
For example you could do this:
I’ve also just updated
DateTimeHelper::toDateTime()
to support passing in PHP DateTime arrays like the above (craftcms/cms@ad2f39e84654550db8b69a7d39cbf88928cdd4af), so alternatively your next release could require"craftcms/cms": "^3.2.6"
and do this instead:(Leave out the
['date']
subs.)