How to convert DateTime() to display time based on WordPress timezone setting?

I need to use PHP’s DateTime(). It’s currently displaying GMT time instead of the time that’s set for the timezone setting (EST) in the WordPress Admin. How can this be converted to show the the time base $time = new DateTime(); echo $time->format(“Y-m-d h:i:s”); // 2015-08-12 04:35:34 (gmt) // 2015-08-12 12:35:34 (what i want — … Read more