问题
How can I get the timestamp of a desired hour? The hour is in a variable that the user set.
回答1:
$hr = 10;
echo strtotime("today +$hr hours");
回答2:
You can use mktime() function to build timestamp of any datetime.
来源:https://stackoverflow.com/questions/4772953/getting-timestamp-in-php