Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime Object formatting default #78

Open
Bel-Shazzar opened this issue Aug 9, 2021 · 0 comments
Open

Datetime Object formatting default #78

Bel-Shazzar opened this issue Aug 9, 2021 · 0 comments

Comments

@Bel-Shazzar
Copy link

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 also posted this question an stack overflow: https://stackoverflow.com/questions/68556579/datetime-format-in-suds-py3

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

No branches or pull requests

1 participant