-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error datetime convert #4657
Comments
Care to open a PR with a bit of explanation why the current code is wrong please? Eternal gratitude if you add tests catching the issue :) |
@xrmx this is my test case and output: pd.to_datetime(1521475500, utc=False, unit="s") pandas: 0.22.0 |
Please open a PR with the proposed changes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this line results wrong date time:
https://github.com/apache/incubator-superset/blob/fc47729233e7ce44e225edbeb628f6a5f0376eda/superset/viz.py#L158
the proper way is:
pd.to_datetime(df[DTTM_ALIAS], utc=False, unit="s") and df[DTTM_ALIAS] = pd.to_datatime(df[DTTM_ALIAS], utc=False, unit="ms")
The text was updated successfully, but these errors were encountered: