Question
· Apr 23, 2020

How to use classparameters?

Hello!

I'm not really familiar with how and if class parameters can be used during runtime or if it is static.

Class %TimeStamp has parameter XMLTIMEZONE [Constraint = "IGNORE, UTC", Flags = ENUM] = "UTC";

I wonder if that parameter can be changed to IGNORE during runtime and in that case how?

For the moment I have created my own type that inherits from %TimeStamp in order to change to IGNORE

 

Greetings Michael

Discussion (6)1
Log in or sign up to continue

Hi and thanks for answer Eduard.

It did not work properly and it is still labeled as UTC in the SOAP request I send.
I.E 2019-09-12T10: 39: 00Z.  Maybe i'm doing something wrong. I dont' know.

Anyway, if I instead changed this type in my class from:
Property VisitTime As% TimeStamp (XMLNAME = "VisitTime"  , XMLPROJECTION = "ATTRIBUTE");

To:
Property VisitTime  As% TimeStamp (XMLNAME = "VisitTime " , XMLPROJECTION = "ATTRIBUTE", XMLTIMEZONE = "IGNORE");

it came out as 2019-09-12T10:39:00 (No Z at the end indicating UTC). And that's what I was looking for. However it can couse me trouble if the schema will be updated and i will lost my changes. And it would be easier to not change every %Timestamp-property in my class