You can just add a column to the database and set it to data type timestamp. Then set the default in the database to current_timestamp.
Then you don't have to account for it in the php code or insert at all. The database will insert the current timestamp automatically whenever a record is added.