PHP date/time format, need some assistance

前端 未结 2 1234
庸人自扰
庸人自扰 2021-01-28 01:08

can you please help me with formatting the following date using PHP

variable $start contains the following date

this date

Wed Feb 01 2012 05:00:0         


        
2条回答
  •  醉梦人生
    2021-01-28 01:29

    $d = new \DateTime('Wed Feb 01 2012 05:00:00 GMT-080');
    echo $d->format('Y-m-d\TH:i:s');
    

提交回复
热议问题