WSChains timestamp in ISO format

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

WSChains timestamp in ISO format

L4 Transporter

Hi community,

anyone figured already out how to get the actual datetime (aka now) in ISO format "2025-01-31T00:10:09.334Z" in WSchains xml?

I would need that to send in a json.

original post

2 REPLIES 2

L7 Applicator

Use a Script: You can create a script to generate the current datetime in ISO format and include it in your WSChains XML. Here's an example using Python:

from datetime import datetime

import pytz

 

# Get the current time in UTC

now = datetime.now(pytz.utc)

 

# Format the datetime in ISO 8601 format

iso_format = now.isoformat()

 

print(iso_format)

 

 

  1. This script will output the current datetime in the required ISO format, which you can then include in your WSChains XML.
  2. Include in WSChains XML: You can embed the generated datetime in your XML as follows:
  3. <WSChains>
  4. <Timestamp>{{iso_format}}</Timestamp>
  5. <!-- Other elements -->
  6. </WSChains>

 

 

 

perhaps

 

Hi, thank you for your reply.

Questions:

  • how will the python script be called?
  • the python simply prints to output, so how will that output be stored accessible for WSChains as "iso_format"?

The password management process will only call the CANetPluginInvoker.exe with the WSChains dll.

 

With powershell I could get it like this:

(Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffK")

 @Robert Stothard​ ?

  • 16 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!