Date/Time not saved correctly? 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-&gt;get('field_date_ept2')-&gt;getValue()[0];
$result = \Drupal::service('date.formatter')-&gt;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 php.ini file.
The datetime value stored in DB is the UTC value. Any built in date formatter should give you the correct local time on the page. However if you need to manually get it from DB you'll have to convert the timezone yourself.