Added tzinfo to dependencies to fix test errors.
Moved logic into the mark_dirty/clean methods.