I examined use of ISO durations, but that introduces a bunch of unnecessary
complexity for implementors. I decided to propose instead use of an ISO
8601Time zone designator as an xs:string.
Proposed:
dfdl:timeZoneFromDateTime($arg as xs:dateTime?) as xs:string?
Summary: Returns the timezone component of $arg if any. If $arg has a
timezone component, then the result is a string in the format of an ISO
Time zone designator. Interpreted as an offset from UTC, its value may
range from +14:00 to -14:00 hours, both inclusive. UTC is represented as
"Z".
If the $arg has no timezone component, then the value of the
dfdl:calendarTimeZone property expressed as an ISO 8601 Time zone
designator is returned, or ""(empty string) is returned if the
dfdl:calendarTimeZone property is ""(empty string).
Examples
-
dfdl:timeZoneFromDateTime(xs:dateTime("1999-05-31T13:20:00-05:00"))returns
the
xs:string value "-05:00".
-
dfdl:timeZoneFromDateTime(xs:dateTime("2000-06-12T13:20:00Z")) returns
the xs:string value "Z".
-
dfdl:timeZoneFromDateTime(xs:dateTime("2004-08-27T00:00:00")) with
dfdl:calendarTimeZone='America/New_York' returns the xs:string "-05:00".
---------- Forwarded message ----------
From: Mike Beckerle
In the below. Should xs:datetime have trailing timezone as well? Right now it has no tz component.
Seems to me it should to match iso 8601 format which is what XSD uses.
Also, I believe we now think ZZZ is not the right behavior, and seems to be deprecated in ICU. The right thing is ZZZZZ.
calendarPatternKind
Enum
Valid values ‘explicit’, ‘implicit’
‘explicit’ means the pattern is given by dfdl:calendarPattern,
‘implicit’ means the pattern is derived from the XML schema date/time type.
*Logical Type *
*Default Pattern*
xs:date
yyyy-MM-dd
xs:dateTime
yyyy-MM-dd'T'HH:mm:ss
xs:time
HH:mm:ssZZZ
Annotation: dfdl:element, dfdl:simpleType
-- Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com
-- Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com -- Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com