Skip to content

Commit

Permalink
Fix JqkaEmotionRecorder invalid time range issue
Browse files Browse the repository at this point in the history
  • Loading branch information
foolcage committed Aug 24, 2024
1 parent f19115c commit 14b3303
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zvt/recorders/jqka/emotion/JqkaEmotionRecorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def init_timestamps(self, entity_item) -> List[pd.Timestamp]:
if latest_infos:
start_date = latest_infos[0].timestamp
else:
# 最近一年半的数据
start_date = date_time_by_interval(current_date(), -365 - 366 / 2)
# 最近一年的数据
start_date = date_time_by_interval(current_date(), -360)
return pd.date_range(start=start_date, end=pd.Timestamp.now(), freq="B").tolist()

def record(self, entity, start, end, size, timestamps):
Expand Down Expand Up @@ -102,8 +102,8 @@ def init_timestamps(self, entity_item) -> List[pd.Timestamp]:
if latest_infos:
start_date = latest_infos[0].timestamp
else:
# 最近一年半的数据
start_date = date_time_by_interval(current_date(), -365 - 366 / 2)
# 最近一年的数据
start_date = date_time_by_interval(current_date(), -360)
return pd.date_range(start=start_date, end=pd.Timestamp.now(), freq="B").tolist()

def record(self, entity, start, end, size, timestamps):
Expand Down

0 comments on commit 14b3303

Please sign in to comment.