[#ASN1_TIME_set_string_X509]
= ASN1&lowbar;TIME&lowbar;set&lowbar;string&lowbar;X509
:mrdocs:

Set an ASN1&lowbar;TIME from a string, preferring the X&period;509 UTCTime&sol;GeneralizedTime rules&period;

== Synopsis

Declared in `&lt;openssl&sol;asn1&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;TIME&lowbar;set&lowbar;string&lowbar;X509(
    xref:ASN1_TIME.adoc[ASN1&lowbar;TIME]* s,
    char const* str);
----

== Return Value

1 on success, or 0 if `str` is not a valid X&period;509 time encoding&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| Destination time object to update&period;
| *str*
| NUL&hyphen;terminated time string in ASN&period;1 UTCTime or GeneralizedTime form&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
