Fixed bug with getting a date from a timestamp