debugged a case in which the database date would not be updated properly