-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True [Continued] #5015
Comments
After further investigation, the problem is solved by modifying viz.py to set: Should this not be set by default as all SQL queries are made using AT TIME ZONE 'UTC' ? |
It happens to me as well. @sbarlock your solution worked for me as well 👍 thank you! |
@mistercrunch Is it worth for me to submit a PR or is this fix just valid for PostgresDB users? Cheers, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
Seems like this is still a real issue, at least for me? |
Hi @villebro, I'm tagging you here as you've been involved in timestamps things earlier? This seems to be a problem for several users (including me). |
@kakoni can you open a new ticket for this? I'm happy to work on this issue, but want to make sure I fully understand all the details and can replicate this on |
This is surely still an issue |
still not solved. any solution without changing code? |
@Towhid1 as stated above, please open a new ticket with all the necessary details and I will be happy to help. |
FYI, the issue is still present in I understand a new ticket would be required to open a proper PR. In the meantime, a quick and dirty workaround — not always feasible, I admit — is to change the db column type from |
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
0.25.2
Postgres V10
Actual results
When setting TimeGrain to e.g. month, the following error occurs:

Note in the picture that I manually changed the value of utc=False to utc=True in viz.py. This did not solved the problem.
The SQL request in itself works well with the PostgresDB ;

The problem observed here is similar to the one discussed in issue #4250. The PR merged in issue 4250 did not solved the problem for me.
Steps to reproduce
The text was updated successfully, but these errors were encountered: