Add asn1_time_to_tm function and check days in month