title: Inserting DATE TIMESTAMP Value to MySQL Using PHP
body: <p>Using php I am inserting or updating the mysql database with create date or modified date using the variables</p>
  
  <pre><code>$datestring = "%Y:%m:%d %h:%i:%s";
  $time = time();
  $createdate= mdate($datestring, $time);
  </code></pre>
  
  <p>In this <code>$createdate</code> will be the variable I use to insert or update the table. But it's updating the wrong value. It's not the server time or localtime. Mostly it's 30 mins delay with the server's time.</p>