[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Time dataengine invalid sunrise and sunset results
From:       Petri =?iso-8859-1?q?Damst=E9n?= <petri.damsten () gmail ! com>
Date:       2009-11-26 7:15:43
Message-ID: 200911260915.47934.petri.damsten () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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" (application/pgp-signature)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic