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

DateTimeField in process_form_data is passed through without processing; convert to ISO 8601 #438

Open
japsu opened this issue Feb 19, 2024 · 0 comments

Comments

@japsu
Copy link
Contributor

japsu commented Feb 19, 2024

While the FormData formats of DateField (2024-02-24) and TimeField (19:55) suffice and are close enough to ISO 8601, the format of DateTimeField is not (2024-02-24T19:55 without seconds or time zone). In form_data it should be what the user's browser sent us, but in values it should be converted first to the full ISO 8601 UTC format of 2024-02-24T17:55:00Z and finally, as of #436, to the scope time zone such as 2024-02-24T19:55:00+02:00.

The <input type="datetime-local"> does not convey the time zone but implies it is the user's time zone. In places where we send formData: Object.entries(formData), we should probably include our best guess of the user time zone either added into the formData or next to it. (OR: Should we understand this to be always in the scope time zone? Case US organizer of a FI event setting the program schedule publishing time)

There are occasions of TODO(#436) in the frontend source code signalling places where we could be using DateTimeField if this was taken into account, but currently are not.

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

No branches or pull requests

1 participant