[XML Records] DateTime in ISO 8601 format

[XML Records] DateTime in ISO 8601 format

  
Forge Component
(24)
Published on 15 Jun by Ricardo Silva
24 votes
Published on 15 Jun by Ricardo Silva

I need to serialize and deserialize my XML using the ISO-8601 DateTime format, with an

offset(eg., 2014-01-24T12:33:11-06:00).

Please suggest a way to do this. [P9.1;Java]

My suggestion for this would be to create an action (or extension action if you are more comfortable with it) to format the date time the way you want.

In the OutSystems structure to serialize you'd only have a text and place there the already formatted date time value.

Ricardo Silva wrote:

My suggestion for this would be to create an action (or extension action if you are more comfortable with it) to format the date time the way you want.

In the OutSystems structure to serialize you'd only have a text and place there the already formatted date time value.


Ricardo,

Thanks for the reply.

I was hoping that TypeDateTimeFormat in DefaultXmlConfig would do the trick?

That option is not implemented, I'm afraid. XML Records is always using a fixed format for serializing dates, times and datetimes.

It is ISO format without the timezone.

Wait, no.

I saw wrong. In fact you can specify a dateTime format using those parameters.

The default dateTime format is "yyyy-MM-dd'T'HH:mm:ss". Since this is using a built-in OutSystems class I'm not sure if it supports timezones. You can probably simply add it as a fixed string.