heimdall2
heimdall2 copied to clipboard
Datetime format used in the nginx samples can't be parsed by native js Date object
node and at least firefox from the browsers have a parsing incompatibility. it seems like 2017-09-22 14:12:44 -0400 is parsable by the Date constructor in node but not in firefox.
tested against chrome and it works fine there.
the issue with firefox has been historical (results of the caat export from previous releases)
the error just bubbles all the way to the top now because of using the formatter class. the date class itself just silently accepts the erroneous output. https://github.com/mitre/heimdall2/blob/c3764a34364cf6c5114556168a652f793b357eae/libs/hdf-converters/src/converters-from-hdf/caat/reverse-caat-mapper.ts#L71-L79
SonarCloud Quality Gate failed. 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
5 Code Smells
No Coverage information
0.0% Duplication
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
long term solution is to move to consistently using a datetime library whenever interacting with dates. we have a mix of plain js and momentjs. momentjs is no longer being actively maintained so we should find a replacement library. their official recommendation is luxon. luxon is able to (eventually) find the correct format type.