moved timetoa() from asn1.c to types.c