$time = ['hours' => 18, 'minutes' => 0, 'seconds' => 0]; // 18:00:00 $ost = mktime($time['hours'], $time['minutes'], $time['seconds']) - time() - (3 * 60 * 60); echo date('H:i:s ', $ost);