title: Converting PHP String having a unix timestamp value to a MySQL Timestamp value
body: <p>I am setting a Database value within from a PHP file. In php file i have a string variable which stores unix timestamp value. </p>
  
  <p>MySql table i am having is having a schema where i have to store these timestamp values in login field which is of timestamp datatype. </p>
  
  <p>i tried sending  </p>
  
  <pre><code>date('Y-m-d G:i:s', strtotime($userLogin));
  </code></pre>
  
  <p>to my database but all it stores is <code>0000-00-00 00:00:00</code></p>