I made a date range field, and after entering some values and saving on first glance it looks ok, if i entered 20:00:00h it will display the same, but in the DB when i look at the stored values it's -2h (so 18:00:00). Anyone know why?
Also this is a huge problem when manually retrieving the values from the node, i fiddled around the time zones etc but i always get the value stored in the DB.
$node = Node::load($node_id); $date = $node->get('field_date_ept2')->getValue(); $result = \Drupal::service('date.formatter')->format($date['value'], 'custom', 'Y-m-d\TH:i:s', 'Europe/Berlin); echo $result; // 2019-12-12T18:00:00
p.s. the timezone in my drupal 8 site is "Europe/Berlin" and the same as in my