Converting time to DateTime objects