You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/08/11 01:31:48 UTC

[superset] branch sc_73474 created (now 378dc1a33e)

This is an automated email from the ASF dual-hosted git repository.

beto pushed a change to branch sc_73474
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 378dc1a33e fix: timezone issue in Pandas 2

This branch includes the following new commits:

     new 378dc1a33e fix: timezone issue in Pandas 2

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[superset] 01/01: fix: timezone issue in Pandas 2

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch sc_73474
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 378dc1a33e407737ff83bf7529111b8030f2238f
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Thu Aug 10 18:31:21 2023 -0700

    fix: timezone issue in Pandas 2
---
 superset/result_set.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/superset/result_set.py b/superset/result_set.py
index 4ca39cba2b..4e50f3e758 100644
--- a/superset/result_set.py
+++ b/superset/result_set.py
@@ -167,12 +167,11 @@ class SupersetResultSet:
                         try:
                             if sample.tzinfo:
                                 tz = sample.tzinfo
-                                series = pd.Series(
-                                    array[column], dtype="datetime64[ns]"
-                                )
-                                series = pd.to_datetime(series).dt.tz_localize(tz)
+                                series = pd.Series(array[column])
+                                series = pd.to_datetime(series).dt.tz_localize(None)
                                 pa_data[i] = pa.Array.from_pandas(
-                                    series, type=pa.timestamp("ns", tz=tz)
+                                    series,
+                                    type=pa.timestamp("ns", tz=tz),
                                 )
                         except Exception as ex:  # pylint: disable=broad-except
                             logger.exception(ex)