I\'m using the following INSERT statement:
INSERT INTO messages SET `to` = \'\".$to.\"\', `from` = \'\".$this->userid.\"\', `title` = \'\".$title.\"\', `m
$myDateTime = new DateTime('2012-05-23 17:01', new DateTimeZone('GMT')); $myDateTime->setTimezone(new DateTimeZone('Asia/Kolkata')); echo $myDateTime->format('Y-m-d H:i');
After modification to above code, such as desired format; you could use $myDateTime variable to insert into database.
$myDateTime