PHP:strtotime()......再次

Til*_*lka 1 php string format parsing strtotime

我怎么写"+3天12:34:56"才能使strtotime()正确解析?

Vol*_*erK 6

$ts = strtotime("12:34:56 +3 days");
echo date('Y-m-d H:i:s O', $ts);
Run Code Online (Sandbox Code Playgroud)

版画

2009-09-23 12:34:56 +0200
Run Code Online (Sandbox Code Playgroud)

(我当地的时区是CEST/gmt + 2)