From kde-commits Mon Aug 31 22:02:23 2015 From: Jasem Mutlaq Date: Mon, 31 Aug 2015 22:02:23 +0000 To: kde-commits Subject: [kstars/gsoc2015-ekos] kstars/time: Take UTC into consideration when constructing a new KStarsData f Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=144105855805010 Git commit b35e3954379a2baa22703d83399e6735a76b16f2 by Jasem Mutlaq. Committed on 31/08/2015 at 22:01. Pushed by mutlaqja into branch 'gsoc2015-ekos'. Take UTC into consideration when constructing a new KStarsData from existin= g one M +2 -0 kstars/time/kstarsdatetime.cpp http://commits.kde.org/kstars/b35e3954379a2baa22703d83399e6735a76b16f2 diff --git a/kstars/time/kstarsdatetime.cpp b/kstars/time/kstarsdatetime.cpp index ccdaaec..76ed422 100644 --- a/kstars/time/kstarsdatetime.cpp +++ b/kstars/time/kstarsdatetime.cpp @@ -31,6 +31,7 @@ KStarsDateTime::KStarsDateTime() : QDateTime() KStarsDateTime::KStarsDateTime( const KStarsDateTime &kdt ) : QDateTime() { setDJD( kdt.djd() ); + setUtcOffset(kdt.utcOffset()); } = /*KStarsDateTime::KStarsDateTime( const QDateTime &kdt ) : @@ -50,6 +51,7 @@ KStarsDateTime::KStarsDateTime( const QDateTime &qdt ) : QDate _d =3D qdt.date(); long double jdFrac =3D ( _t.hour()-12 + ( _t.minute() + ( _t.second() = + _t.msec()/1000.)/60.)/60.)/24.; DJD =3D (long double)( _d.toJulianDay() ) + jdFrac; + setUtcOffset(qdt.utcOffset()); } = KStarsDateTime::KStarsDateTime( const QDate &_d, const QTime &_t ) :