Comments (7)
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.
As discussed here:
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.
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
or2021-12-10T09:05:47.966
from cvrf-csaf-converter.
Clarified - Assigned for implementation.
from cvrf-csaf-converter.
@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.
@tschmidtb51 / @mfd2007: Is this procedure ok? @zpevma already working on it in a local pull request.
from cvrf-csaf-converter.
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)
- Correct error handling HOT 2
- Build error HOT 6
- Missing comments HOT 1
- Transfer ownership HOT 4
- Version 1.0.0 released HOT 1
- Correct implementation to reflect OASIS standard HOT 2
- CVRF 1.1 support HOT 3
- Fix calling Jsonschema
- Fix pylint warnings
- Non-deterministic order of parsed affected product ids
- Use csaf package
- Transfer PyPI project HOT 3
- Add pylint as GH Action
- Address pyLint results HOT 2
- Clarify location of config file HOT 6
- Wrong version when installing from source HOT 7
- Correct warning message
- Omit empty array `scores`
- Output warning of "tolerated" errors when present
- Correct implementation to conform CSD02 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cvrf-csaf-converter.