I think this is just how ICU interprets the 'Z' field. Although it is
ISO8601, (which does allow the Z for +0000), it seems it always unparses
to +0000 instead of Z. But because it's ISO8601, it does still accept Z
when parsing.
If you instead use a timezone pattern of 'XX', it gives a similar
behavior to 'Z', except +0000 should unparse to Z, for example:
dfdl:calendarPattern="yyyyMMdd'T'HHmmssXX"
For more information about all the different format patterns, see the
table on this page:
https://unicode-org.github.io/icu-docs/apidoc/dev/icu4j/com/ibm/icu/text/SimpleDateFormat.html
On 2023-10-29 07:51 AM, Roger L Costello wrote:
This datetime input:
20230926T124800Z
Parses to this:
<DateTime>2023-09-26T12:48:00+00:00</DateTime>
And unparses to this:
20230926T124800+0000
Notice ... +0000 ... why isn't it Z?
Here's the DFDL:
<xs:element name="DateTime" type="xs:dateTime"
dfdl:calendarPatternKind="explicit"
dfdl:calendarCheckPolicy="strict"
dfdl:calendarPattern="yyyyMMdd'T'HHmmssZ"
dfdl:calendarFirstDayOfWeek="Monday"
dfdl:calendarDaysInFirstWeek="7"
dfdl:calendarTimeZone="UTC+6"
dfdl:calendarLanguage="en" />