以微秒为单位增加几个小时 php

add some hours to time with microseconds php

嗨,我需要在我格式化的时间中增加 8 小时

            $t = microtime(true);
            $micro = sprintf("%06d",($t - floor($t)) * 1000000);
            $d = new DateTime( date('Y-m-d H:i:s.'.$micro, $t) );
            $d->format("Y-m-d H:i:s.u")   // 2015-03-02 07:37:18.715271

我使用这种格式是因为我还需要显示微秒。现在我需要在这里面增加 8 个小时。你能建议我怎么做吗?

感谢

$t = microtime(true);
$micro = sprintf("%06d",($t - floor($t)) * 1000000);
$d = new DateTime( date('Y-m-d H:i:s.'.$micro, $t) );
print $date = $d->format("Y-m-d H:i:s.u");
print $new_time = date("Y-m-d H:i:s".$micro, strtotime($date.'+8 hours'));