Date Time Picker automatically converts Local Time to GMT 00
- August 3, 2023
- 2 replies
- 2828 views
Hi all,
I'm facing an issue with Date Time Picker widget that auto converts the picked time (e.g. 03-08-2023 00:00:00 GMT+2) to the GMT 00 Time (e.g. 02-08-2023 22:00:00 GMT 00). And because I'm in Germany this is can be solved by statically adding +2 to the selected datetime, but it has to also check the so called Daylight Save Time that sometimes can affect the time shifting between GMT+2 and GMT+1.
Applying getTimezoneOffset() won't work because it's already converted directly to GMT 00 (UTC) which means applying getTimezoneOffset() will always return 0.
Is there a way to avoid the timezone conversion between the Date Time Picker widget so that if my customers from all over the world select 03.08.2023 00:00:00 on the Date Time Picker widget it will be also understood and processed further as 03.08.2023 00:00:00 GMT 00 no matter where they are, and regardless the Daylight Saving Time that may vary.

