sadpandajoe commented on code in PR #43960:
URL: https://github.com/apache/superset/pull/43960#discussion_r3962304427


##########
superset-frontend/packages/superset-ui-core/src/time-format/utils/normalizeTimestamp.ts:
##########
@@ -17,9 +17,21 @@
  * under the License.
  */
 
+/**
+ * Timezone-aware strings carry an explicit UTC offset (`Z` or `±hh:mm`).
+ * Rewriting them to a bare `Z` would relabel the wall-clock time as UTC,
+ * shifting the instant; they are returned untouched. Timezone names
+ * (`UTC`, `Europe/Helsinki`) are not valid ISO offsets and are still
+ * stripped the historic way.
+ */
+const TS_REGEX_TZ_AWARE =
+  /^(\d{4}-\d{2}-\d{2})[T\s](\d{2}:\d{2}:\d{2}\.?\d*)(?:Z|[+-]\d{2}:?\d{2})$/;

Review Comment:
   A Trino `timestamp with time zone` value can be rendered as `2023-03-11 
08:26:52.695 +03:00` (with a space before the offset). This guard does not 
recognize that form, so it falls through to `TS_REGEX` and becomes 
`2023-03-11T08:26:52.695Z`, shifting the instant by three hours. Could this 
accept the separator before the offset and add that regression case?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to