You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
if the date in the xml I want to check has timezone the comparison fails (I had to raise the real error because it is being masked).
The date is 2019-01-11+01:00 and yes I known a date only with a timezone is pointless but iso8601 allows it, and someone apparently uses it, it would be better to strip timezone if date only
The text was updated successfully, but these errors were encountered:
As best I can tell PyXB correctly supports timezones for xsd:date instances and provides it through xsdRecoverableTzinfo.
Offhand it looks like this is a bug, but due to #100 this probably isn't going to get worked. It's slightly more likely to happen if you can attach a standalone test case to this issue.
It might also be related to the comparison value not having a timezone. One potential quick fix would be to use 1970-01-01Z. Dunno if it'd work, or if it'd just break comparison when there isn't a timezone, but it's worth a try.
unfortunately using timezone aware constraint will fail comparison with non timezone aware values in xml, but since timezone in date only is pointless even for comparison, I suppose you can just drop the tzinfo value in the offset
I have a type:
if the date in the xml I want to check has timezone the comparison fails (I had to raise the real error because it is being masked).
The date is
2019-01-11+01:00
and yes I known a date only with a timezone is pointless but iso8601 allows it, and someone apparently uses it, it would be better to strip timezone if date onlyThe text was updated successfully, but these errors were encountered: