XML to Datetime

17 views
Skip to first unread message

Amarpreet Singh

unread,
Feb 3, 2022, 4:16:51 PM2/3/22
to Ansible Project
Looking for help to convert XML output of a ssl certificate and get date out of it. 
Then compare and check if that cert has expired or not.

output

    "stdout": "{\"not-valid-after\": \"Apr 20 17:36:03 2022 GMT\"}",
    "stdout_lines": [
        "{\"not-valid-after\": \"Apr 20 17:36:03 2022 GMT\"}"
    ],
    "stdout_xml": "<not-valid-after>Apr 20 17:36:03 2022 GMT</not-valid-after>\n"

I am looking to change the red highlighted line in datetime format. 

Dick Visser

unread,
Feb 3, 2022, 5:42:10 PM2/3/22
to ansible...@googlegroups.com
Where does this xml originate from?

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/26e20e6e-5c9b-45f6-96e4-f523f5fa8534n%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Rilindo Foster

unread,
Feb 4, 2022, 11:10:16 AM2/4/22
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages