Time dataengine invalid sunrise and sunset results
Petri Damstén
petri.damsten at gmail.com
Thu Nov 26 08:15:43 CET 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20091126/c7d1a541/attachment.sig
More information about the Plasma-devel
mailing list