Преглед на файлове

[0917] 修复DataWeatherLocal 时区转换时间错误bug

taosj преди 2 седмици
родител
ревизия
5e9bc295c7
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      forecast-backend-server/src/main/java/com/ufo/project/weather/service/impl/DataWeatherLocalServiceImpl.java

+ 2 - 2
forecast-backend-server/src/main/java/com/ufo/project/weather/service/impl/DataWeatherLocalServiceImpl.java

@@ -243,8 +243,8 @@ public class DataWeatherLocalServiceImpl implements IDataWeatherLocalService
             Function<DataWeatherLocal, Double> valueGetter)
     {
 
-        Instant startInstant = Instant.ofEpochSecond(startTime * 1000);
-        Instant endInstant = Instant.ofEpochSecond(endTime * 1000);
+        Instant startInstant = Instant.ofEpochSecond(startTime);
+        Instant endInstant = Instant.ofEpochSecond(endTime);
         String startFormatted = startInstant.atZone(ZoneId.of("Asia/Shanghai"))
                           .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX"));
         String endFormatted = endInstant.atZone(ZoneId.of("Asia/Shanghai"))