How to get GMT date in yyyy-mm-dd hh:mm:ss in PHP

前端 未结 6 1538
旧时难觅i
旧时难觅i 2020-12-16 10:08

I want to get the current date in yyyy-mm-dd hh:mm:ss format.

I have tried:

gmdate(\'yyyy-mm-dd hh:mm:ss \\G\\M\\T\', time());

Its retur

6条回答
  •  醉酒成梦
    2020-12-16 10:50

    gmdate() is doing exactly what you asked for.

    Look at formats here: http://php.net/manual/en/function.gmdate.php

提交回复
热议问题