Hey there, I'm using drupal and a pgsql database, but after long searches I still can't figure out how to put a CURRENT_TIMESTAMP or now() into the database when inserting a row into a table. Putting now() on the default value of a column won't work, because drupal won't accept it on the database schema, so that's out of question.
The current column type is "timestamp without timezone" or "time without timezone", which drupal's schema accepts. Now the problem is inserting a date there.
I have tried:
$now = format_date(time(), 'custom', 'Y-m-d H:i:s');
and inserting it with the string placeholder '%s', but pgsql gave me an error.
I also tried to change the type to integer and insert using time() php function, and it didn't work (if it did i'd use it on other tables), so maybe i'll stick with the timestamp type as it is makes more sense.
Thanks in advance.