根據服務器:PHP的strtotime最後一天上個月功能產生2個月前
$ date
Wed Mar 1 01:46:06 EST 2017
的php.ini
date.timezone = America/New_York
當我這樣做,我得到一個奇怪的結果:
$month = date('M',strtotime('last day last month'));
$sel = "SELECT records where month='".$month."'";
echo $sel;
結果是:
SELECT records where month='Jan';
任何想法爲什麼不是2月?
上一個和最後一個沒有區別。 – bart2puck