DateTime picker shortcomings

6
I'm having problems with a DateTime field with display set to date and Time. As we know, the date picker only allows you to select the date part. Manually entering the time part seems to be ignored and the field reverts to 12:00 AM. The workaround I have tried is to add a string field alongside the DateTime field (change the display to Date only) and format the time string field with a regular expression (like 08:30). Then have microflows on change to set the DateTime field to the day selected plus the time value entered. This works to a certain extent. The problem I am having with this is when I have users in more than one timezone. The time string part entered is always interpreted as in the server timezone, not the user's local timezone. This makes the workaround unsuitable for applications used in multiple timezones. The expression I am using to add the time string to the date is parseDateTime(formatDateTime($TestDataAdd/StartDate,'MM-dd-yyyy')+' '+$TestDataAdd/StartTime+':00', 'MM-dd-yyyy HH:mm:ss') Is there a different expression I can use so the time string is interpreted as being in the user's local timezone? Is there a function to convert the time string entered in one timezone to the correct local time string when viewed from a different timezone? - I guess not. Is there any way to detect the users timezone from the client computer regional settings, then use that in microflows to adjust the displayed value on object display and save? Are there any plans to supply a proper Date-Time picker instead of the current Date picker??
asked
1 answers
4

Sadly, the browser does not send its timezone in a reliable format to the server. So the only solution i currently can think of is either build a custom widgets which sends the timezone to the server (using JavaScripts Date.getTimezoneOffset()) or let the user store his timezone ones in its profile. (which is not unusual, but not ideal either)

answered