Giter Site home page Giter Site logo

Comments (7)

tschmidtb51 avatar tschmidtb51 commented on June 1, 2024 2

The first variant is preferred (especially since the offset can be e.g. -06:00) and fully in line with RFC 3339 Section 5.6.

from cvrf-csaf-converter.

sustefil avatar sustefil commented on June 1, 2024 1

As discussed here:

#21 (comment)

Convert all observed timestamps into the consistent formatting which was agreed upon above.
Will be done as a Pull request for this issue.

from cvrf-csaf-converter.

zpevma avatar zpevma commented on June 1, 2024 1

There are couple of edge cases, which pass the input validation, but not output one. The most extreme which doesn't make sense is -22011-11-26T00:00:00Z: perfectly passes xsd validation, but not the output one.

I suggest to:

  • ignore negative dates (log error)
  • ignore years > 9999 (log error)
  • if no timezone is specified on the input, don't specify it on the output
  • if we have UTC timezone stated by Z, replace it by +00:00
  • always output in the format 2021-12-10T09:05:47.966+00:00 or 2021-12-10T09:05:47.966

from cvrf-csaf-converter.

cgi1 avatar cgi1 commented on June 1, 2024

Clarified - Assigned for implementation.

from cvrf-csaf-converter.

cgi1 avatar cgi1 commented on June 1, 2024

@zpevma: Please check this one and this one to be compliant with the date format desc here.

This can also be achived, by rechecking all timestamp in the end - change implemented in one PR.

from cvrf-csaf-converter.

cgi1 avatar cgi1 commented on June 1, 2024

@tschmidtb51 / @mfd2007: Is this procedure ok? @zpevma already working on it in a local pull request.

from cvrf-csaf-converter.

tschmidtb51 avatar tschmidtb51 commented on June 1, 2024

There are couple of edge cases, which pass the input validation, but not output one. The most extreme which doesn't make sense is -22011-11-26T00:00:00Z: perfectly passes xsd validation, but not the output one.

I suggest to:

* ignore negative dates (log error)

That's OK.

* ignore years > 9999 (log error)

That's OK.

* if no timezone is specified on the input, don't specify it on the output

That would be invalid in CSAF. The CVRF CSAF 1.2 standard states that any timestamp with "an empty zone designator MUST be treated as having UTC offset 0 or equivalently" (see [CSAF-2.2.1-2]

* if we have UTC timezone stated by `Z`, replace it by +00:00

That's OK.

* always output in the format `2021-12-10T09:05:47.966+00:00` or `2021-12-10T09:05:47.966`

First one is OK. Second is not a valid according to RFC 3339, section-5.6.

from cvrf-csaf-converter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.