Added more error handeling to asciiTimeToDouble and fixed improper casts.