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

fix datetime writing #106

Merged
merged 3 commits into from
Aug 25, 2021
Merged

fix datetime writing #106

merged 3 commits into from
Aug 25, 2021

Conversation

tlambert03
Copy link
Owner

fixes #104

@MatteBailey, this should do it. this PR also includes #105 which also unpins xmlschema (whose updates had been causing some problems)

the one thing I was unable to do, unfortunately, is preserve the 7 "sub-second" digits. this is a limitation of python's datetime object which only support 6 digits of sub-second precision, so your date will go from ...9251548Z to ...925154Z when writing out.

@MatteBailey
Copy link

Excellent! I don't think preserving the 7 sub-second digits is important for our users, so this seems totally fine to me. I'll give the patched version a try in our code shortly.

@tlambert03 tlambert03 added the bug Something isn't working label Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

to_xml() produces invalid datetimes.
2 participants