[weather dataengine] bbc,envcan,noaa: fix day/night calculation for observe

"time" engine ignores the timezone in the passed DateTime variable,
only looks at the one given in the first argument
parent 28d0af67
...@@ -747,7 +747,8 @@ bool UKMETIon::readObservationXMLData(const QString& source, QXmlStreamReader& x ...@@ -747,7 +747,8 @@ bool UKMETIon::readObservationXMLData(const QString& source, QXmlStreamReader& x
(data.observationDateTime.isValid() && (data.observationDateTime.isValid() &&
(!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude))); (!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude)));
if (canCalculateElevation) { if (canCalculateElevation) {
data.solarDataTimeEngineSourceName = QStringLiteral("Local|Solar|Latitude=%1|Longitude=%2|DateTime=%3") data.solarDataTimeEngineSourceName = QStringLiteral("%1|Solar|Latitude=%2|Longitude=%3|DateTime=%4")
.arg(QString::fromUtf8(data.observationDateTime.timeZone().id()))
.arg(data.stationLatitude) .arg(data.stationLatitude)
.arg(data.stationLongitude) .arg(data.stationLongitude)
.arg(data.observationDateTime.toString(Qt::ISODate)); .arg(data.observationDateTime.toString(Qt::ISODate));
......
...@@ -739,7 +739,8 @@ bool EnvCanadaIon::readXMLData(const QString& source, QXmlStreamReader& xml) ...@@ -739,7 +739,8 @@ bool EnvCanadaIon::readXMLData(const QString& source, QXmlStreamReader& xml)
(data.observationDateTime.isValid() && (data.observationDateTime.isValid() &&
(!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude))); (!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude)));
if (canCalculateElevation) { if (canCalculateElevation) {
data.solarDataTimeEngineSourceName = QStringLiteral("Local|Solar|Latitude=%1|Longitude=%2|DateTime=%3") data.solarDataTimeEngineSourceName = QStringLiteral("%1|Solar|Latitude=%2|Longitude=%3|DateTime=%4")
.arg(QString::fromUtf8(data.observationDateTime.timeZone().id()))
.arg(data.stationLatitude) .arg(data.stationLatitude)
.arg(data.stationLongitude) .arg(data.stationLongitude)
.arg(data.observationDateTime.toString(Qt::ISODate)); .arg(data.observationDateTime.toString(Qt::ISODate));
......
...@@ -491,7 +491,8 @@ bool NOAAIon::readXMLData(const QString& source, QXmlStreamReader& xml) ...@@ -491,7 +491,8 @@ bool NOAAIon::readXMLData(const QString& source, QXmlStreamReader& xml)
(data.observationDateTime.isValid() && (data.observationDateTime.isValid() &&
(!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude))); (!qIsNaN(data.stationLatitude) && !qIsNaN(data.stationLongitude)));
if (canCalculateElevation) { if (canCalculateElevation) {
data.solarDataTimeEngineSourceName = QStringLiteral("Local|Solar|Latitude=%1|Longitude=%2|DateTime=%3") data.solarDataTimeEngineSourceName = QStringLiteral("%1|Solar|Latitude=%2|Longitude=%3|DateTime=%4")
.arg(QString::fromUtf8(data.observationDateTime.timeZone().id()))
.arg(data.stationLatitude) .arg(data.stationLatitude)
.arg(data.stationLongitude) .arg(data.stationLongitude)
.arg(data.observationDateTime.toString(Qt::ISODate)); .arg(data.observationDateTime.toString(Qt::ISODate));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment