On Thursday 26 November 2009 06:56:09 Amos Kariuki wrote:
> I have some test code to obtain the sunrise and sunset time given a
> longitude and latitude for a location:
>
> QString Latitude = "40";
> QString Longitude = "-75";
> Plasma::DataEngine* timeEngine =
> Plasma::DataEngineManager::self()->loadEngine("time"); const
> Plasma::DataEngine::Data timeData=
> timeEngine->query(QString("Local|Solar|Latitude=%1|Longitude=%2").arg(Lati
> tude).arg(Longitude)); qDebug() << "Sunrise: " << timeData["Sunrise"] <<
> "Sunset: " << timeData["Sunset"];
>
> The result I get is:
> Sunrise: QVariant(QDateTime, QDateTime("Tue Nov 24 20:01:02 2009") )
> Sunset: QVariant(QDateTime, QDateTime("Wed Nov 25 05:32:35 2009") )
>
>
> However, the results for that location (40, -75) based on NOAA's solar
> calculator at <http://www.esrl.noaa.gov/gmd/grad/solcalc/> are: Sunrise:
> 05:57
> Sunset: 15:37
There are problems in KDE 4.3 calculation. In KDE 4.4
America/New York|DateTime=2009-11-24T12:00:00|Solar|Latitude=40|Longitude=-75
Gives:
Sunrise: QVariant(QDateTime, QDateTime("Tue Nov 24 06:55:32 2009") )
Sunset: QVariant(QDateTime, QDateTime("Tue Nov 24 16:37:55 2009") )
And noaa for the same time zone:
Sunrise: 06:56
Sunset: 16:38
Petri
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
