User bio
404 bio not found
Member since Nov 11, 2020
Posts:
Replies:
Hi Nezla.
As the URL starts out as "ac1.mqtt.sx3ac.com", suggesting that the API is using MQTT, is the %net.httprequest adapter the right way to go?
I think it'd be good to take a look at Using the MQTT Adapters to see how the adapter can be used if you haven't already.
Have you tried adding backticks to your double-quotes to escape them?
PS C:\Users\Colin\Desktop> irissession healthconnect -U user 'Say^ImplUtil(`"Your String Here`")'
Certifications & Credly badges:
Julian has no Certifications & Credly badges yet.
Global Masters badges:







Followers:
Following:
If you're looking to simply convert timezone codes to the UTC offset, I'd setup a simple utility that returns the desired string based on a case statement.
Something like:
ClassMethod DisplayTimezoneToUTCOffset(pInput as %String) As %String{ Quit $CASE($ZCONVERT(pInput,"U"), "CEST":"+02:00", "CET":"+01:00", "BST":"+01:00", :"") }
If you then want to build the entire string, you could do similar to above for the months, and then have the following:
Class Demo.Utils.ExampleUtils.TimeConvert { ClassMethod DisplayDateTimeToLiteral(pInput as %String) As %String{ // Deconstruct the input string into it's logical parts. // Variables starting d are "display" values that will be converted later. Set DayOfWeek = $P(pInput," ",1) //Not used Set dMonth = $P(pInput," ",2) Set Day = $P(pInput," ",3) Set Time = $P(pInput," ",4) Set dTimeZone = $P(pInput," ",5) Set Year = $P(pInput," ",6) //Return final timestamp Quit Year_"-"_..DisplayMonthToLiteral(dMonth)_"-"_Day_" "_Time_..DisplayTimezoneToUTCOffset(dTimeZone) } ClassMethod DisplayTimezoneToUTCOffset(pInput as %String) As %String{ Quit $CASE($ZCONVERT(pInput,"U"), "CEST":"+02:00", "CET":"+01:00", "BST":"+01:00", :"") } ClassMethod DisplayMonthToLiteral(pInput as %String) As %String{ Quit $CASE($ZCONVERT(pInput,"U"), "JAN":"01", "FEB":"02", "MAR":"03", //etc. etc. "JUL":"07", :"") } }
Which then gives the following: