日期格式 - 如何将 'n' 小时添加到 php 中的当前时间?
Date Format - How to add 'n' hours to the current time in php?
我得到当前时间:
$today = time();
$date = date('h:i:s A', strtotime($today));
如何将当前时间加 5 小时?
$today = time();
date('h:i:s A', strtotime('+5 hours'), $today);
strtotime 将解析任何英文文本日期时间描述。
我得到当前时间:
$today = time();
$date = date('h:i:s A', strtotime($today));
如何将当前时间加 5 小时?
$today = time();
date('h:i:s A', strtotime('+5 hours'), $today);
strtotime 将解析任何英文文本日期时间描述。