Issue with Date Format in Web API

sonarqube

(Sachin Sharma) #1

DateTime parsing fails when using this API
/api/measures/search_history?component=Care-Guard&metrics=code_smells,vulnerabilities,sqale_index,bugs,coverage,line_coverage,branch_coverage,lines_to_cover,test_success_density,test_errors,test_failures,skipped_tests,duplicated_lines_density,comment_lines_density&from=2017-10-19T13:00:00+0200&to=2017-10-19T13:00:00+0200

  • versions used (SonarQube 7.0)
  • error observed ({
    “errors”: [
    {
    “msg”: “Date ‘2017-10-19T13:00:00 0200’ cannot be parsed as either a date or date+time”
    }
    ]
    })
  • steps to reproduce(hit the above API)
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour