This I think is closer to what you need.
I have made sure that I set a specific timezone on both the DateTime objects so there can be no confusion
This also takes into account the possibility that the market could already be open, and tells you how long to closing time.
It also make use of Todays date in all cases, so any daylight saving time should be coped with.
There is also a time setter for the current time so you can check what happens at different times of the day, see $now->setTime(10, 30, 0);
for setting a specific time of day.
<?php
$now = new DateTime();
$now->setTimezone(new DateTimeZone('America/New_York'));
// To test what happens at different times of the current day
// Set a specific time for the NOW DateTIme
$now->setTime(10, 30, 0);
echo 'Now = ' . $now->format('d/m/Y H:i:s').PHP_EOL;
$opens = new DateTime();
$opens->setTimezone(new DateTimeZone('America/New_York'));
$opens->setTime(9, 30, 0);
echo 'Opens = ' . $opens->format('d/m/Y H:i:s').PHP_EOL;
$interval = $now->diff($opens);
// if invert == 1 its a minus difference so market is open
if ( $interval->invert == 1){
// Its already open
echo $interval->format("Market has been open for: %h hours, %i minutes, %s seconds").PHP_EOL;
// When will it close
$close = new DateTime();
$close->setTimezone(new DateTimeZone('America/New_York'));
$close->setTime(3, 30, 0);
$interval = $now->diff($close);
echo $interval->format("Market closes in: %h hours, %i minutes, %s seconds").PHP_EOL;
} else {
// it will open in
echo $interval->format("Market opens in: %h hours, %i minutes, %s seconds").PHP_EOL;
}