I'm currently receiving the following date object from JS inside PHP via a POST
request:
Tue Feb 25 2020 22:31:03 GMT+0100 (Mitteleuropäische Normalzeit)
How can I format this now to the SQL timestamp format Y-m-d H:i:s
including the given timezone at the end?
I've tried this:
date( 'Y-m-d H:i:s', 'Tue Feb 25 2020 22:31:03 GMT+0100 (Mitteleuropäische Normalzeit)' )
But this causes an error:
date() expects parameter 2 to be int, string given
I've already searched on SO but I can only find questions about timestamps.