Quellcode durchsuchen

[2610021] 修复编译错误: Instant 无 toDate() 方法, tm.toInstant().toDate() 改为 Date.from(tm.toInstant())

taosj vor 1 Woche
Ursprung
Commit
bc836dcc13

+ 1 - 1
forecast-backend-server/src/main/java/com/ufo/project/data/task/MockDataTask.java

@@ -269,7 +269,7 @@ public class MockDataTask
             double fastFluct = 1 - phys.fastAmp * (0.5 + 0.5 * Math.sin(2 * Math.PI * tH / phys.fastT + phys.fastP));
             double actual = clamp(theoretical * (1 - 0.90 * cloud) * fastFluct * phys.availability / 100.0, 0, theoretical);
 
-            Date tmDate = tm.toInstant().toDate();
+            Date tmDate = Date.from(tm.toInstant());
 
             DataWeatherLocal weather = new DataWeatherLocal();
             weather.setTm(tmDate);