I was confirming that DAFFODIL-1580 [1] is still an issue and was going
to open a bug with ICU, but as I look more at this, I think this is just
a limitation with timezones and DFDL, but wanted confirmation first.

For example, we have a test schema that looks like this:

 <xs:element name="time" type="xs:dateTime"
   dfdl:calendarPattern="hh:mm.VVVV" ... />

And matching data that looks like this:

  8:43.Los Angeles Time

This parses to an infoset that looks like this:

  <time>08:43:00-08:00</time>

And that infoset unparses to this:

  08:43.GMT-08:00

Note that the unparsed timezone does not match the original data.
DAFFODIL-1580 describes this behavior as a bug (either in Daffodil or
ICU) but I think this is actually expected behavior. A DFDL infoset does
not contain any location-specific timezone information--it only contains
a GMT offset (a restriction of XML Schema). So this data will always
unparse to a non-location specific timezone, depending on the calendar
pattern. For some patterns this will be an offset or a generic timezone
like PST (which should both roundtrip fine), but others might result in
"Unknown" or "unk". I think this only affects the "V" and "v" calendar
patterns, but additional tests should be added to confirm this behavior.

This is the expected behavior, correct?


[1] https://issues.apache.org/jira/browse/DAFFODIL-1580

Reply via email to