Explorar o código

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

taosj hai 1 semana
pai
achega
5e9bc295c7

+ 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"))