Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhou-JiaJun committed May 19, 2023
1 parent 5d34646 commit 8718fa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rqalpha/utils/datetime_func.py
Expand Up @@ -32,8 +32,8 @@ def convert_date_to_date_int(dt):


def convert_date_to_int(dt):
t = dt.year * 10000 + dt.month * 100 + dt.day
t *= 1000000
# 原先的写法在pandas2.0下会被转化为int32类型导致精度丢失
t = dt.year * 10000000000 + dt.month * 100000000 + dt.day * 1000000
return t


Expand Down

0 comments on commit 8718fa2

Please sign in to comment.