【发布时间】:2026-01-26 03:10:01
【问题描述】:
...而且不止一次...
$now = date("D, d M Y H:i:s O");
foreach ($items AS $item)
{
$currentDate = strtotime($now);
$pastDate = $currentDate-(60*5);
$formatDate = date("Y-m-d H:i:s", $pastDate);
echo "\t\t<item>\n";
echo "\t\t\t<pubDate>" . $formatDate . "</pubDate>\n" ;
现在,我希望 formatDate 每次减少 5 分钟,我不希望每个元素都使用相同的时间...谢谢
【问题讨论】:
标签: php datetime foreach decrement