Added a function to parse a timestamp into a date