mirror of https://github.com/apache/superset.git
Update date_parser.py (#17426)
This commit is contained in:
parent
bcef8fa13b
commit
bfc813dea2
|
@ -324,7 +324,9 @@ class EvalDateTruncFunc: # pylint: disable=too-few-public-methods
|
|||
month=1, day=1, hour=0, minute=0, second=0, microsecond=0
|
||||
)
|
||||
if unit == "quarter":
|
||||
dttm = pd.Period(pd.Timestamp(dttm), freq="Q").to_timestamp()
|
||||
dttm = (
|
||||
pd.Period(pd.Timestamp(dttm), freq="Q").to_timestamp().to_pydatetime()
|
||||
)
|
||||
elif unit == "month":
|
||||
dttm = dttm.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
|
||||
elif unit == "week":
|
||||
|
|
Loading…
Reference in New Issue