Clean up date handling.

Remove home-grown date formatting, and replace it by usage of the
DateUtils class which is present since API level 3.