Skip to content

Fix date parser for missing ms#110

Merged
dlopes7 merged 1 commit intodynatrace-oss:mainfrom
fishi0x01:fix-date-parsing
Apr 24, 2025
Merged

Fix date parser for missing ms#110
dlopes7 merged 1 commit intodynatrace-oss:mainfrom
fishi0x01:fix-date-parsing

Conversation

@fishi0x01
Copy link
Copy Markdown
Contributor

Dynatrace API does not return milliseconds if they are 000, e.g., 2025-01-18T21:35:03.000Z gets converted to 2025-01-18T21:35:03Z

That leads to the following error in the client API:

ValueError("time data '2025-01-18T21:35:03Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'")

This might be an issue in the API itself, but for now we can mitigate it by accepting both ISO pattern (with and without ms).

@dynatrace-cla-bot
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sonarqubecloud
Copy link
Copy Markdown

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

Successfully merging this pull request may close these issues.

3 participants