usnistgov / metaschema

Documentation for and implementations of the metaschema modeling language
https://pages.nist.gov/metaschema/
Other
36 stars 19 forks source link

Should date-with-timezone be allowed? #582

Open swanky-oscal opened 7 months ago

swanky-oscal commented 7 months ago

This doc (Data Types Used in Metachema) defines the date-with-timezone data type as:

A string representing a 24-hour period, optionally qualified by a timezone. A date-with-timezone is formatted according to “full-date” as defined RFC3339, with the addition of an optional timezone, specified as a time-offset according to RFC3339.

Which is to say, it is composed of two RFC3339 components (per the ABNF in RFC3339 5.6): full-date and time-offset.

My limited understanding of RFC3339 suggests that this is not RFC3339 compliant. If true, then the ability to process date-with-timezone may vary, depending on the programming language and supporting tools.

I think that a fundamental goal of OSCAL should be to support broad interoperability across infrastructures and development environments. I think date-with-timezone is contrary to that goal, and should not be supported.

That also means that the date data type should be restricted to just an RFC3339 full-date. Timezone should not be supported on dates at all.

I suggest that the Metaschema be updated such that