Fix bug where beginDate and dateUploaded are not sorting in their groups
seperately. 

Also fix bug where local time zone was being used to store dates,
resulting in incorrect graphs in the stats view.