Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement date-time format auto-detection and casting #3

Open
ronaldtse opened this issue Nov 23, 2024 · 0 comments
Open

Implement date-time format auto-detection and casting #3

ronaldtse opened this issue Nov 23, 2024 · 0 comments

Comments

@ronaldtse
Copy link
Contributor

Some of the specs fail like this:

  28) Reqif XML round-trip conversion with file strictdoc_02_read_reqif_input.reqif performs lossless round-trip conversion
      Failure/Error: expect(generated).to be_analogous_with(cleaned_xml_string)
      
        DIFF 1: expected node: <CREATION-TIME>2018-10-12T16:43:58+00:00</CREATION-TIME>
                actual node  : <CREATION-TIME>2018-10-12T16:43:58</CREATION-TIME>
                diff from    : 2018-10-12T16:43:58+00:00
                diff to      : 2018-10-12T16:43:58

Reason: date format had no time offset in input, but generated value has time offset

And

  16) Reqif XML round-trip conversion with file doors_export.xml performs lossless round-trip conversion
      Failure/Error: expect(generated).to be_analogous_with(cleaned_xml_string)
      
        DIFF 1: expected node: <CREATION-TIME>2014-07-09T10:19:00-04:00</CREATION-TIME>
                actual node  : <CREATION-TIME>2014-07-09T10:19:00.830-04:00</CREATION-TIME>
                diff from    : 2014-07-09T10:19:00-04:00
                diff to      : 2014-07-09T10:19:00.830-04:00

Reason: date format had sub second time offset in input, but generated value does not.

Implementations of ReqIF seem generally inconsistent with what ISO 8601 type of time is encoded.

We need to decide whether we enforce a particular ISO 8601 type time format (which means we update the specs), or detect the time format and re-generate the same when we output the round-tripped time (e.g. when we modify something and spit the file back out.

henb added a commit to henb/reqif that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant