frafra commented on issue #15905:
URL: https://github.com/apache/superset/issues/15905#issuecomment-929226661


   There are various places in the code where such method is used as default 
when dumping the JSON (look for `default=json_int_dttm_ser`):
   
   
https://github.com/apache/superset/blob/1669947bcd429e926c6e8de5ceaafcfe5496b28b/superset/charts/api.py#L518-L523
   
   
https://github.com/apache/superset/blob/0f16177bde156163643c55e5cd24fab996f40971/superset/utils/core.py#L618-L619
   
   ...and others.
   
   Here is the problematic function:
   
   
https://github.com/apache/superset/blob/0f16177bde156163643c55e5cd24fab996f40971/superset/utils/core.py#L604-L615
   
   It was meant to handle date, datetime, but not time. It actually uses a 
generic function before trying to dealing with date and datetime, such 
`base_json_conv`:
   
   
https://github.com/apache/superset/blob/0f16177bde156163643c55e5cd24fab996f40971/superset/utils/core.py#L550-L573
   
   It would be enough to add a specific case:
   
   ```
   > python3
   Python 3.8.10 (default, May 05 2021, 15:36:36) [GCC] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import datetime
   >>> str(datetime.time())
   '00:00:00'
   ```


-- 
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]

Reply via email to