I cannot set the DateTime tag to type UTC, it always set the type to Local
I have tried setting the property "isdst" to true. That property is available if the DS is of type xsd_tm.
Note that this code is autogenerated with wsdl2rpg
* **************************************************************
* RPG call : stub_op_RequestSeriesData
* parm in : This_t this
* parm in : xsdc__string Value0
* parm in : xsdc__string Value1
* parm in : xsdc__string Value2
* parm in : ArrayOfString Value3
* parm in : ArrayOfInt Value4
* parm in : ArrayOfString Value5
* parm in : ArrayOfString Value6
* parm in : ahs_date Value7
* parm in : ahs_date Value8
* parm in : xsdc__string Value9
* parm in : ahs_logical Value10
* parm in : ahs_date Value11
* parm out: ahshist_series out
* return : *ON = success
* : *OFF = failure
* **************************************************************
D stub_op_RequestSeriesData...
D PR 1N extproc('stub_op_RequestSeriesData+
D _')
D this likeds(This_t)
D Value0 likeds(xsd_string)
D Value1 likeds(xsd_string)
D Value2 likeds(xsd_string)
D Value3 likeds(ArrayOfString_t)
D Value4 likeds(ArrayOfInt_t)
D Value5 likeds(ArrayOfString_t)
D Value6 likeds(ArrayOfString_t)
D Value7 likeds(ahs_date_t)
D Value8 likeds(ahs_date_t)
D Value9 likeds(xsd_string)
D Value10 likeds(ahs_logical_t)
D Value11 likeds(ahs_date_t)
D out likeds(ahshist_series_t)
//Code for other stand-alone fields and data structures
QuoteDateFirst.val.value.year = %int(%subdt(%date():*YEARS)) - 1900;
QuoteDateFirst.val.value.mon = %int(%subdt(%date():*MONTHS)) - 1;
QuoteDateFirst.val.value.mday = %int(%subdt(%date():*DAYS));
QuoteDateFirst.val.value.hour = 0;
QuoteDateFirst.val.value.min = 0;
QuoteDateFirst.val.value.sec = 0;
QuoteDateFirst.val.value.wday = 0;
QuoteDateFirst.val.value.yday = 0;
QuoteDateFirst.val.value.isdst = 1;
//Some code initialization of the stub
If (stub_op_RequestSeriesData(WsStub:Version:Source:SystemName:SeriesItems:SecurityIds
:SourceFields:FieldNames:QuoteDateFirst:QuoteDateLast
:TimeStampFlg:OnlyValidData:ModifiedSince
:SeriesResult) = *On);
Some tags in the output are removed
The output in the SOAP BODY is expected to be:
<ns1:SystemName>NOMX</ns1:SystemName>
<ns1:Items><ns1:string>SE0000108656_SEK_XSTO</ns1:string>
</ns1:Items>
<ns1:SourceFields><ns1:string>ASKPRICE</ns1:string>
<ns1:string>BIDPRICE</ns1:string>
<ns1:string>LASTPRICE</ns1:string>
</ns1:SourceFields>
<ns1:QuoteDateFirst><ns1:val>2019-08-26T02:01:01</ns1:val>
</ns1:QuoteDateFirst>
<ns1:QuoteDateLast><ns1:val>2019-08-26T02:01:01</ns1:val>
</ns1:QuoteDateLast>
<ns1:TimeStampFlag>D</ns1:TimeStampFlag>
</ns1:RequestSeriesData>
Actual output in the SOAP BODY is:
<ns1:SystemName>NOMX</ns1:SystemName>
<ns1:Items><ns1:string>SE0000108656_SEK_XSTO</ns1:string>
</ns1:Items>
<ns1:SourceFields><ns1:string>ASKPRICE</ns1:string>
<ns1:string>BIDPRICE</ns1:string>
<ns1:string>LASTPRICE</ns1:string>
</ns1:SourceFields>
<ns1:QuoteDateFirst><ns1:val>2019-08-26T02:01:01+02:00</ns1:val>
</ns1:QuoteDateFirst>
<ns1:QuoteDateLast><ns1:val>2019-08-26T02:01:01+02:00</ns1:val>
</ns1:QuoteDateLast>
<ns1:TimeStampFlag>D</ns1:TimeStampFlag>
</ns1:RequestSeriesData>
With the following error message:
<detail><Message>QuoteDateFirst or QuoteDateLast is invalid</Message><ExceptionType>System.Exception</ExceptionType><ExceptionMessage>DateTime must not be of local kind, use UTC or Unspecified instead</ExceptionMessage></detail>
Edit 2019-08-26 I played around with C code that is generated without any results.
Edit 2019-09-06 According to IBM there is nothing to do, the time zone is set on a system level and it cannot be changed by a program.