inserting date timestamp value to mysql thru php in godaddy hosting site

Posted by Suj on Stack Overflow See other posts from Stack Overflow or by Suj
Published on 2010-04-07T04:44:04Z Indexed on 2010/04/07 4:53 UTC
Read the original article Hit count: 238

Filed under:
|
|

Hi all, I'm using GoDaddy's Shared Linux hosting.

Using php i am inserting or updating the mysql database with create date or modified date using the variables
$datestring = "%Y:%m:%d %h:%i:%s";
$time = time();
$createdate= mdate($datestring, $time);

In this $createdate will be the variable i use to insert or update the table. But its updating the wrong value. ITs not the server time or localtime. mostly its 30 mins delay with godaddy's server time.

Pls help.

© Stack Overflow or respective owner

Related posts about godaddy

Related posts about php