Local to UTC time
If the user enters a date & time, say 5/28/2020 15:30. What is the best method for converting that local datetime to UTC?
Updated by Roel Standaert about 1 year ago
That should work if the current locale is set to the right timezone. You can set it like this:
On Linux that should just work, because it comes with its own copy of the IANA time zone database. On Windows, there is a time zone database, but it is not compatible with our implementation. You'll have to download the time zone database instead: https://www.iana.org/time-zones. There are some more details in the
locale feature example: https://github.com/emweb/wt/tree/master/examples/feature/locale