考慮以下字符串日期:Fri Sep 02 2011 21:00:00 GMT+0100 (GMT Daylight Time)
的strtotime日期怪異的結果
在PHP,如果我做以上一個的strtotime,然後將其轉換回字符串日期,它似乎獲得一個小時。
echo $str_date," Vs ",date("c",strtotime($str_date));
產地:
Fri Sep 02 2011 21:00:00 GMT+0100 (GMT Daylight Time)
Vs的2011-09-02T22:00:00+01:00
我意識到這是日光節約做,但如何彌補這一?
這將產生預期的結果,謝謝。 –