问题
I get current time:
$today = time();
$date = date('h:i:s A', strtotime($today));
How do I add 5 hours to the current time?
回答1:
$today = time();
date('h:i:s A', strtotime('+5 hours'), $today);
strtotime will parse any textual datetime description in English.
来源:https://stackoverflow.com/questions/31779306/date-format-how-to-add-n-hours-to-the-current-time-in-php