* make sure certain fields get set to zero.

* fix a bug caused by an unexpected side effect of setting the calendar for a date format.