[weather] NOAA: read complete observation time data

parent 81a8c2fb
......@@ -409,6 +409,8 @@ void NOAAIon::parseWeatherSite(WeatherData& data, QXmlStreamReader& xml)
parseDouble(data.stationLat, xml);
} else if (elementName == QLatin1String("longitude")) {
parseDouble(data.stationLon, xml);
} else if (elementName == QLatin1String("observation_time_rfc822")) {
data.observationDateTime = QDateTime::fromString(xml.readElementText(), Qt::RFC2822Date);
} else if (elementName == QLatin1String("observation_time")) {
data.observationTime = xml.readElementText();
QStringList tmpDateStr = data.observationTime.split(QLatin1Char(' '));
......
......@@ -51,6 +51,7 @@ public:
// Current observation information.
QString observationTime;
QDateTime observationDateTime;
QString weather;
float temperature_F;
......
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