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
gmdate() is doing exactly what you asked for.
gmdate()
Look at formats here: http://php.net/manual/en/function.gmdate.php