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

[BUG] DateTime - Invalid isoformat string #28

Open
lieblinger opened this issue Apr 25, 2022 · 2 comments
Open

[BUG] DateTime - Invalid isoformat string #28

lieblinger opened this issue Apr 25, 2022 · 2 comments

Comments

@lieblinger
Copy link

The following issue pops up by printing a form with DateTime component and applies to latest version of python-formio-data (4.0):

ValueError: Invalid isoformat string: '2022-04-25T19:29:58.000Z'

Error to render compiling AST
ValueError: Invalid isoformat string: '2022-04-25T19:29:58.000Z'
Template: formio_report_qweb.report_formio_form_template
Path: /t/div/div[2]/t
Node: <t t-foreach="o._formio.components.items()" t-as="component">
                    <t t-set="component" t-value="component[1]"/>
                    <t t-call="formio_report_qweb.component"/>
                </t>

Date Format String in Form Builder Component:

dd/MM/yyyy HH:mm
@bobslee
Copy link
Member

bobslee commented May 18, 2022

I can't reproduce this datetime component (with your format) to store with the fraction 000Z.
Can you provide the full JSON of the component?

Apparently there's a need to parse the datetime value to cover such case.
I wasn't aware of this fraction, but found some info:

https://stackoverflow.com/questions/16151383/what-does-the-000z-of-yyyy-mm-ddt000000-000z-mean
.000 is the fraction of a second and Z indicates UTC timezone.

https://stackoverflow.com/questions/28949911/what-does-this-format-means-t000000-000z

@bobslee
Copy link
Member

bobslee commented Oct 16, 2023

@lieblinger possible to test this with the affected form and the latest version of the library?

I did some persing improvements in datetimeComponent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants