time in wrong time zone when using get I have a date/time field, when I save it as 1:00:00 AM, it displays in the edit form as 1:00 am, however when I do a get of that field value in my module
with $posted_date=$static_media-&gt;get('field_pup_posted')-&gt;getValue();

, it comes out as`Array
(
    [0] => Array
        (
            [value] => 2017-06-14T05:00:00
        )

)`

Why is it being stored as a 5 when it should be a 1?  and how can i get it programatically in the correct time zone
drupal stores in UTC have to convert this to current time zone

$dt=new \DateTime($changed_date, new \DateTimeZone('UTC'));
$dt-&gt;setTimeZone(new \DateTimeZone('America/New_York'));
$correct_date =  $dt-&gt;format('Y-m-d H:i:s');