I've got a Date field in Drupal that I want to preprocess. Unfortunately
Gives me a value off by one hour (8:00 when expected is 9:00). I believe the issue has something to do with the way Drupal stores the date vs how it displays it later (taking into account Timezones). I tried passing in the default timezone to the DateTime object but that didn't help. I also tried using the
\Drupal::service('date.formatter') to format the date but the result is still off.
When debugging I found that by using:
Does anyone know how to extract it or maybe there's something else that I'm missing? I'm running Drupal 8.1.9