Content Fragment | How to save the date in author given time zone
Hi All,
We have a content fragment template which has date field and Time Zone dropdown. Now our requirement is that when the author selects a date and the time zone we want the date to be saved in the author selected time zone format.
For example , if author has entered date as "May 21,2021 11:29 am" and selected Time zone as "UTC+8: Hong Kong, Beijing, Kaula Lumpur" then instead of saving the date as "2021-05-21T11:29:00.000+05:30" it should be saved like "2021-05-21T11:29:00.000+08:00" which is author selected time zone format.
One approach we are planning is to invoke a listener or a javascript function when the author tries to save the content fragment.
Please suggest if anyone has come up with the similar kind of use-case and solved it. Also the approach taken to achieve the same.