Javascript Timestamp to php - mysql timestamp type <p>I send javascript timestamp data to php to add into mysql where I have type TIMESTAMP:</p> <p>DATABASE - startTime type:</p> <p><img src="https://i.stack.imgur.com/9eJr1.png" alt="enter image description here"></p> <p>Now I try to send with ajax, timestamp from javascript <code>var startTime = Date.now();</code> to php where I need to tranform into TIMESTAMP type for mysql... so I try:</p> <pre><code>$datum = $app-&gt;request-&gt;post('startTime'); $startTime = $datum-&gt;format('Y-m-d H:i:s'); //FIRST ATTEMP $startTime = date("Y-m-d H:i:s", $datum); //SECOND TRY </code></pre> <p>Above I write two cases I try but both dont work... How I can transform it to correct format to add it to database...</p> <p><em>Probbaly you will ask why that when you have this in PHP, why get it with JS? Becouse my app will use people in Autralia (and all ov r the world) and server is in EUROPE, so if I use php server time then I will make wrong date</em></p>