I am having trouble formatting %Time to a JSON format. I have tried configuring the parameter "FORMAT" of my property but that didn't work. For some reason, it keeps putting a Z and the end of the time.  Property: Property TimeCollected As %Time(FORMAT = "2");</p>

Setting the Property through a custom function which is used in the DTL:

set convertedDateTime= ##class(Ens.Util.Time).ConvertDateTime("202203220800","%q(1)","%q(3)") //Setting to HoroLog format
set pOutput = $PIECE(convertedDateTime,",",*) //splitting to obtain seconds past midnight </p>

Testing the DTL, and also converting to JSON has the same result, shows:

I can't explain why it's adding the Z at the end. Am I missing something obvious?

Any help would be greatly appreciated.

</body></html>