Skip to content

Fix: Handle XSD end-of-day midnight notation 24:00:00#582

Open
paul-gerber-svg wants to merge 2 commits into
eclipse-basyx:developfrom
rwth-iat:xsd-midnight-24
Open

Fix: Handle XSD end-of-day midnight notation 24:00:00#582
paul-gerber-svg wants to merge 2 commits into
eclipse-basyx:developfrom
rwth-iat:xsd-midnight-24

Conversation

@paul-gerber-svg

Copy link
Copy Markdown

Before, parsing XSD timestamps with an hour of 24 causes a ValueError. Now, the parser in sdk/basyx/aas/model/datatypes.py correctly identifies 24:00:00 as midnight, handles the day rollover for DateTime, and normalizes Time to 00:00:00.

Unit tests for valid and invalid edge cases are added to sdk/test/model/test_datatypes.py inside TestDateTimeTypes.

Fixes #564

Before, parsing XSD timestamps with an hour of 24 causes a ValueError.
Now, the parser in `sdk/basyx/aas/model/datatypes.py` correctly identifies 24:00:00 as midnight, handles the day rollover for `DateTime`, and normalizes `Time` to 00:00:00.

Unit tests for valid and invalid edge cases are added to `sdk/test/model/test_datatypes.py` inside `TestDateTimeTypes`.

Fixes eclipse-basyx#564
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.

1 participant