i have a strange issue with a field "date". First i save it programatically this way :
$now = new \DateTime();
$node->set('field_paiement_date' => DrupalDateTime::createFromTimestamp($now->getTimestamp());
$node->save();
Then when i come on the content type in the back office i've got this value :
And finally when i dump the field in question i got this value :
My current timezone is 'Pacific/Noumea', so the correct value i want to show to the users is the one when i dump the field. What is the best way to do that ?
Regards,
date
property, which is a formattable date object instead of thevalue
property which is the raw data.