From a8cc81a1e8398ade6a11f6ea4815816752684bd9 Mon Sep 17 00:00:00 2001 From: sonichy Date: Wed, 20 Nov 2019 13:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88=E5=90=91=E6=AD=A3?= =?UTF-8?q?=E5=BC=8F=E7=89=88=E8=BF=81=E7=A7=BB=20Qt5.10=20->=20Qt5.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- forcastwidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/forcastwidget.cpp b/forcastwidget.cpp index 38f2303..3a83a65 100644 --- a/forcastwidget.cpp +++ b/forcastwidget.cpp @@ -96,12 +96,12 @@ void ForcastWidget::updateWeather() double lon = coord.value("lon").toDouble(); m_settings.setValue("lat", lat); m_settings.setValue("lon", lon); - QDateTime time_sunrise = QDateTime::fromSecsSinceEpoch(JO_city.value("sunrise").toInt(), Qt::LocalTime); - QDateTime time_sunset = QDateTime::fromSecsSinceEpoch(JO_city.value("sunset").toInt(), Qt::LocalTime); + QDateTime time_sunrise = QDateTime::fromMSecsSinceEpoch(JO_city.value("sunrise").toInt()*1000L, Qt::LocalTime); + QDateTime time_sunset = QDateTime::fromMSecsSinceEpoch(JO_city.value("sunset").toInt()*1000L, Qt::LocalTime); QJsonArray list = JD.object().value("list").toArray(); int r = 0; for (int i=0; i