我发现可能我必须使用date
函数来获取今天和明天,而不是strtotime
用来将其转换为 unix 时间戳。我只是无法理解如何从中删除时间部分date
并将其替换为 11AM 并将其传递给strtotime
. 我已经添加date_default_timezone_set
到设置为本地时区。
strtotime()
接受各种疯狂的格式,你可以这样做:
$stamp1 = strtotime('today 11 am');
$stamp2 = strtotime('tomorrow 11 am');
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句