The Rails convension for database table ids is that they have
absolutely no meaning in and of themselves.
So the 'Rails Way' to do this is to have a separate column (maybe
called date_as_int) to store this. Then put a unique index on the
column and have validates_uniquness_of :date_as_int in the database.
If this is impossible (and I can't think why it could be) then you
have to alter your database table to remove the auto-increment from
the id column. (A standard Rails migration automatically adds an id
column and sets it to auto increment.) I can pretty much guarantee
that if you try this you will give yourself all sorts of headaches in
both the short-term and the long term. You really should follow the
Rails convension and store this information in a separate column.