Handle daylightsaving in parseDate fn

parseDate function, didn't take daylightsaving into account.