[MGNLUI-7033] Support Unix timestamps and ISO-8061 format as date model values Created: 13/Feb/22  Updated: 16/Feb/22  Resolved: 16/Feb/22

Status: Resolved
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.17

Type: New Feature Priority: Neutral
Reporter: Aleksandr Pchelintcev Assignee: Aleksandr Pchelintcev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty

 Description   

At the moment our DateConverter always assumes that the model value that is passed to the backend is java.util.Date which is the case for JackRabbit, but usually is different in generic backend case. E.g. Norsu, which is backed by JSON documents atm, needs either a string or a long value (unix timestamp).

As a result Norsu either has to deal with post-conversion of j.u.Dates somewhere on data-binding level (ugly and error-prone), or we can extend the DateFieldDefinition configuration and the related converter to gracefully support other possible ways of storing dates.

Dev notes:
The related PR brings support described above, and in addition brings in necessary changes to optionally let the dates to be stored in ISO-8061 compliant format (the one with 'T' separator between date and time vs whitespace as it is currently hardcoded in Magnolia).


Generated at Mon Feb 12 09:42:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.