invoke

operator fun invoke(instant: Instant, formatOverride: Asn1Time.Format? = null): Asn1Time(source)

Constructs a whole-second Asn1Time from an Instant. Sub-second precision is dropped (see SecondsCapped).


operator fun invoke(generalizedTime: String): Asn1Time(source)

Parses an ASN.1 GENERALIZED TIME value string (YYYYMMDDHHMMSS[.fraction]Z) into an Asn1Time. Unlike invoke from an Instant — which is bounded by nanosecond resolution — this preserves an arbitrary-precision fractional second. Reuses the low-level GENERALIZED TIME string parser.