date('Y-m-d H:i:s',strtotime(' 1 month',strtotime('2018-12-01')-1));
Why does it come out as 12 Month 30, 23:59:59
韦小宝2019-01-02 10:44:33
First of all, you have to know what the strtotime function means. The strtotime function parses time into a Unix timestamp. After conversion, you finally have another one minus one, which is of course yesterday's time