buildingSMART / buildingSMART/foundation-API

Clarification on DateTime Format (1.7)

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
38
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Here is what [Foundation-API section 1.7](https://github.com/buildingSMART/foundation-API?tab=readme-ov-file#17-datetime-format) says:

> 1.7 DateTime Format

> DateTime values must be [rfc3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) compliant.

> Examples:
`2016-04-28T16:31:12Z` would represent _Thursday, April 28th, 2016, 16:31:12 (0ms) in UTC timezone_.
`2016-04-28T16:31:12.270Z` would represent _Thursday, April 28th, 2016, 16:31:12 (270ms) in UTC timezone_.
`2016-04-28T16:31:12.270+02:00` would represent _Thursday, April 28th, 2016, 16:31:12 (270ms) with a time zone offset of +2 hours relative to UTC_.

And this is from [BCF-XML 3.0](https://github.com/BuildingSMART/BCF-XML/tree/release_3_0/Documentation#datetime-format):

> DateTime Format

> DateTime values in this specification are always of type `xs:dateTime` which is an ISO 8601 compatible `YYYY-MM-DDThh:mm:ss` format with optional time zone indicators. This is the same format as defined in the BCF-API specification.

> For example, `2016-04-28T16:31:12.270+02:00` would represent _Thursday, April 28th, 2016, 16:31:12 (270ms) with a time zone offset of +2 hours relative to UTC_. Please note that the colon in the timezone offset is optional, so `+02:00` is equivalent to `+0200`.

> **_To void ambiguity, this specification steps away from ISO 8601 on the topic of DateTime values with no timezone: The ISO 8601 says that DateTime values with no timezone designator are local times - In BCF all DateTime values with no timezone designator are assumed to be in UTC._**

So what about the brilliant part where you deliberately (and needlessly) violate ISO 8601?
Would BCF-API handle that differently than BCF-XML, or do the two behave consistently and you just forgot to mention it in the Foundation-API's documentation?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.