Fixed the date updating problem.

The update_date function was passing the unvalidated date to the SQL
query rather than the date formatted by the MySQLdb handler.