I am trying to insert a PHP date into MySQL date value column, but for this I need to format it correctly and make sure I have the right time, for instance, I need to use mysql_real_scape_string(date("h:i:s", time()));
for the time and mysql_real_escape_string(date("Y-m-d"));
for the date itself.
This has caused me little to no problem before now, but all of a sudden, it is not inserting rows because the format is wrong, and also the time has jumped back an hour, say it is 12:40:00, say I echo date("h:i:s", time());
it will tell me that the time is 11:40:00. What is the issue there?