You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/03/22 15:13:41 UTC
[incubator-superset] branch master updated: fix: epoch_s and
epoch_ms to date time (#4664)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new b996523 fix: epoch_s and epoch_ms to date time (#4664)
b996523 is described below
commit b9965230df9940ca4387f9ac75fab90ed1a9c40a
Author: yanyu <de...@yeah.net>
AuthorDate: Thu Mar 22 23:13:38 2018 +0800
fix: epoch_s and epoch_ms to date time (#4664)
---
superset/viz.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/superset/viz.py b/superset/viz.py
index f879639..6f17ad7 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -155,7 +155,8 @@ class BaseViz(object):
else:
if DTTM_ALIAS in df.columns:
if timestamp_format in ('epoch_s', 'epoch_ms'):
- df[DTTM_ALIAS] = pd.to_datetime(df[DTTM_ALIAS], utc=False)
+ df[DTTM_ALIAS] = pd.to_datetime(
+ df[DTTM_ALIAS], utc=False, unit=timestamp_format[6:])
else:
df[DTTM_ALIAS] = pd.to_datetime(
df[DTTM_ALIAS], utc=False, format=timestamp_format)
--
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.