$dates->get('start_date') and $dates->get('end_date') have timezone set to UTC, but the sites have Europe/Brussles (as per php timezone set on server) when installed.
The core formatter handles this by fetching the timezone, I think we should do the same, something like
\Drupal::config('system.date')->get('timezone.default') and also account for users timezone (will be null if not allowed or not set so we can check for that).
Steps to reproduce:
install oe_whitelabel
create an event, set start date with His 00:00:00 and end date with his 23:59:59
visit /nodes
you will see the start date 1 day earlier than set
The issue becomes bigger if we would display the hour (ex requirement for teaser on one of the subsites)
$dates->get('start_date')
and$dates->get('end_date')
have timezone set to UTC, but the sites have Europe/Brussles (as per php timezone set on server) when installed. The core formatter handles this by fetching the timezone, I think we should do the same, something like\Drupal::config('system.date')->get('timezone.default')
and also account for users timezone (will be null if not allowed or not set so we can check for that). Steps to reproduce:The issue becomes bigger if we would display the hour (ex requirement for teaser on one of the subsites)