better mysql date/time type handling