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
I get the following problem, using the suds-py3 package:
reading a datetime from a webservice using suds
the webservice sends an xml containing the datetime in isoformat (smth. like 2021-07-27T11:40:12.823Z)
the generated sudsobject saves this as a python datetime.datetime
if I then try to send this object (without changing it) to the same webservice it is sent in a different timeformat, like this 2021-07-27 11:40:12.823000+00:00 which the service does not accept
I was able to work around this, by going over every possible datetime in the subsobject and replacing it with the .isoformat() of the datetime, but that seems a little hacky to me.
Is there a better, or intended way to do this with suds?
I get the following problem, using the suds-py3 package:
2021-07-27T11:40:12.823Z
)2021-07-27 11:40:12.823000+00:00
which the service does not acceptI was able to work around this, by going over every possible datetime in the subsobject and replacing it with the .isoformat() of the datetime, but that seems a little hacky to me.
Is there a better, or intended way to do this with suds?
I also posted this question an stack overflow: https://stackoverflow.com/questions/68556579/datetime-format-in-suds-py3
The text was updated successfully, but these errors were encountered: