fix: retifive K线获取优化
This commit is contained in:
@@ -325,9 +325,7 @@ public class RefinitivConsumer implements ApplicationRunner {
|
||||
resourceEndpoint = baseURLHistory + symbol;
|
||||
}
|
||||
|
||||
// 创建DateTimeFormatter以匹配所需的格式
|
||||
DateTimeFormatter formatterIso = DateTimeFormatter.ISO_INSTANT;
|
||||
// 格式化Instant
|
||||
String startStr = start.toInstant().atZone(ZoneId.of("UTC")).format(formatterIso);
|
||||
HttpResponse response = HttpUtil.createGet(resourceEndpoint)
|
||||
.form("eventTypes","trade,quote")
|
||||
@@ -352,10 +350,9 @@ public class RefinitivConsumer implements ApplicationRunner {
|
||||
if(StringUtils.equals("D",resolution) || StringUtils.equals("W",resolution) || StringUtils.equals("M",resolution)){
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date d = formatter.parse(date.get(0).toString());
|
||||
t.add(d.getTime());
|
||||
t.add(d.getTime() / 1000);
|
||||
}else {
|
||||
Instant instant = Instant.parse(date.get(0).toString());
|
||||
|
||||
long timestampMillis = instant.getEpochSecond();
|
||||
t.add(timestampMillis);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user