optimize 1m starttime logic judgement
This commit is contained in:
parent
2291a45e55
commit
beb0991af2
|
|
@ -121,8 +121,16 @@ class MarketDataMain:
|
||||||
if end_time_ts - start_time_ts > 86400000 * 15:
|
if end_time_ts - start_time_ts > 86400000 * 15:
|
||||||
start_time_ts = end_time_ts - 86400000 * 15
|
start_time_ts = end_time_ts - 86400000 * 15
|
||||||
start = timestamp_to_datetime(start_time_ts)
|
start = timestamp_to_datetime(start_time_ts)
|
||||||
|
elif isinstance(start, int):
|
||||||
|
if end_time_ts - start > 86400000 * 15:
|
||||||
|
start_time_ts = end_time_ts - 86400000 * 15
|
||||||
|
start = start_time_ts
|
||||||
else:
|
else:
|
||||||
start_time_ts = transform_date_time_to_timestamp(start)
|
start_time_ts = start
|
||||||
|
start = timestamp_to_datetime(start_time_ts)
|
||||||
|
else:
|
||||||
|
logger.error(f"开始时间格式错误: {start}")
|
||||||
|
return None
|
||||||
else:
|
else:
|
||||||
start_time_ts = transform_date_time_to_timestamp(start)
|
start_time_ts = transform_date_time_to_timestamp(start)
|
||||||
if start_time_ts is None:
|
if start_time_ts is None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue