Function for formating the date given a unix time.