

Ask HN: I need help with MYSQL and timestamps - booruguru

I'm using an RSS parser called SimplePie for an RSS reader I built. Unfortunately, SimplePie does not insert a value into the db for items without a timestamp which is making things very wonky for users with certain feeds.<p>I need to add a default value (the time of insertion) to items without a timestamp. I'm new to PHP, but an RSS app I built on SimplePie has been getting a lot of users since the Google Reader shutdown and I need to fix this, ASAP.<p>A recent timestamp looks like this... "1326009170"<p>Using MYSQL/PHPadmin, can I set a default timestamp for this field that matches the format above?
======
rachelbythebay
[http://dev.mysql.com/doc/refman/5.0/en/data-type-
defaults.ht...](http://dev.mysql.com/doc/refman/5.0/en/data-type-
defaults.html)

"The exception is that you can specify CURRENT_TIMESTAMP as the default for a
TIMESTAMP column. See Section 11.1.5.5, “Automatic Initialization and Updating
for TIMESTAMP”.

