PHP date/time format, need some assistance

前端 未结 2 1226
庸人自扰
庸人自扰 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:27
    echo date('Y-m-d\TH:i:s', strtotime('Wed Feb 01 2012 05:00:00 GMT-0800'));
    
    0 讨论(0)
  • 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');
    
    0 讨论(0)
提交回复
热议问题