1 回答

TA貢獻(xiàn)1788條經(jīng)驗(yàn) 獲得超4個贊
首先,如果你有 timeleft 它的你的計數(shù)器:-2820 你可以簡單地將它乘以(-1):-2820 *(-1)= 2820
date_default_timezone_set("Europe/Amsterdam");
$timecountdownend = strtotime("2020-05-18 14:30:00");
$timecountdownstart = strtotime("now");
$startdatetime = "2020-05-18 14:07:00"; //variable for starting datetime
$timeleft = $timecountdownend - $timecountdownstart;
echo ($timeleft);
echo(PHP_EOL);
echo ($timeleft*(-1));
echo(PHP_EOL);
echo( date('Y-m-d h:i:sa',strtotime($startdatetime)+$timeleft*(-1)));
http://sandbox.onlinephpfunctions.com/code/792ec42255d85a45c377b6e8d34cbde143430824
- 1 回答
- 0 關(guān)注
- 139 瀏覽
添加回答
舉報