I have a Google Apps Script which receives a date/time value formatted in rfc3339, for example:2022-12-29T06:34:07.442788Z
However, Google Sheets doesn't recognize this as a date (and neither does Looker/Data Studio).
How can I parse this into a date-consistent format? I can just trim the Z easily, which resolves the issue (but then it is treated as local time) - is there a better way to do this?