koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

Time is not saved as locale string #354

Closed dominikhorn93 closed 1 year ago

dominikhorn93 commented 2 years ago

datetime is saved correctly as locale string, time ist not. Is there a reason for this or is it bug?

image

albanm commented 2 years ago

This is noted in the doc https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/examples#date-picker

"Times alone are stored without representing the offset but also without applying it in the first place. Meaning that if the user select 00:00 we will store 00:00:00Z whatever his timezone. This is because without the context of a date timezone management becomes meaningless."

dominikhorn93 commented 2 years ago

Thanks for pointing that out, I had missed it. That makes sense, of course. A user in our software had modeled Date and Time separately instead of taking the Date Time. That's when it came up.