Skip to content

Commit

Permalink
Fixed bug in xmlparser.py (Issue #1324) (#1325)
Browse files Browse the repository at this point in the history
* Update xmlparser.py

* Update xmlparser.py
  • Loading branch information
prrw authored Jun 5, 2023
1 parent 244f08e commit 98a6489
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion asyncua/common/xmlparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,9 @@ def get_nodeset_namespaces(self) -> List[Tuple[str, ua.String, ua.DateTime]]:
date_time = model.attrib.get('PublicationDate')
if date_time is None:
date_time = ua.DateTime(1, 1, 1)
else:
elif date_time is not None and date_time[-1]=="Z":
date_time = ua.DateTime.strptime(date_time, "%Y-%m-%dT%H:%M:%SZ")
else:
date_time = ua.DateTime.strptime(date_time, "%Y-%m-%dT%H:%M:%S%z")
ns.append((uri, version, date_time))
return ns

0 comments on commit 98a6489

Please sign in to comment.