I’m creating a custom app which uses a date input field.
My computer clock is set to GMT+2, ie my time is 2 hours later than GMT.
When I toggle the GMT setting on the date field, the local time appears 2 hours behind the GMT time when using record.getCellValue:
Local date time (GMT setting off): ‘2022-01-01T10:04:00.000Z’
GMT date time (GMT setting on): ‘2022-01-01T12:04:00.000Z’
I can’t understand why the local time is earlier than gmt when it should be later.
Also, I can’t understand why the local datetime string is being formatted as a utc datetime string, as this doesn’t follow ISO8601.
When I use record.getCellValueAsString, it returns the string ‘1/1/2022 12:04pm’, regardless of the gmt setting.
I notice that the datetime string returned by the REST API seems to change in the same way as record.getCellValue, even though the docs say that only a utc datetime string is returned.
Any help/insights appreciated.