Changed to using DateTime for timstamps

OO method of working out and formatting the correct dates.