1
zj
2025-04-11 d869f01aa59927d0b4c93c908dfdfb9ca6fb326f
src/main/java/project/web/api/RealtimeController.java
@@ -90,13 +90,15 @@
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("symbol", realtime.getSymbol());
         map.put("ts", realtime.getTs());
         String currentTime = realtime.getCurrent_time();
         // 设置时区为纽约的冬令时(Eastern Standard Time, EST)
         long currentTime = 1744341503535L; // 确保 currentTime 是 long 类型
         TimeZone timeZone = TimeZone.getTimeZone("America/New_York");
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         sdf.setTimeZone(timeZone);
         map.put("current_time",sdf.format(currentTime));
         map.put("name", realtime.getName());
         Date date = new Date(currentTime);
         String formattedTime = sdf.format(date);
         map.put("current_time", formattedTime);
         Item item1 = this.itemService.cacheBySymbol(realtime.getSymbol(), false);
         map.put("name", item1.getName());
         map.put("change_ratio", realtime.getChange_ratio());
         Item item = this.itemService.cacheBySymbol(realtime.getSymbol(), true);
         if (item.getDecimals() == null || item.getDecimals() < 0) {