Formatting

Changed the day/month/year to month/day/year.
Moved the time variables locally to the function so that they get
generated on button press to fix the bug where duplicate image names
overwrite themselves.