hy144328 commented on code in PR #39782:
URL: https://github.com/apache/superset/pull/39782#discussion_r3243706676
##########
superset/models/helpers.py:
##########
@@ -2394,7 +2394,15 @@ def dttm_sql_literal(self, dttm: datetime, col:
"TableColumn") -> str:
if tf:
if tf in {"epoch_ms", "epoch_s"}:
- seconds_since_epoch = int(dttm.timestamp())
+ # In general, Superset works with timezone-naive datetime
objects
+ # internally. However, timestamp() applies local timezone to
+ # timezone-naive datetime objects. Therefore, we have to be
explicit
+ # about UTC before calling timestamp().
+ dttm_tz_aware = dttm
Review Comment:
Outdated.
--
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]