summaryrefslogtreecommitdiff
authordrw <drw>2003-03-29 22:32:58 (UTC)
committer drw <drw>2003-03-29 22:32:58 (UTC)
commit340cb7e64fb898966996b00b93c03ca05a347aa5 (patch) (side-by-side diff)
tree0db7548e03ba94e8a71fc73a98fbe74544043062
parent4e17e397c6df9e4e1ac6ee8315bbbced3e3b3b49 (diff)
downloadopie-340cb7e64fb898966996b00b93c03ca05a347aa5.zip
opie-340cb7e64fb898966996b00b93c03ca05a347aa5.tar.gz
opie-340cb7e64fb898966996b00b93c03ca05a347aa5.tar.bz2
Fix for bug #701 - update time and date controls on Main tab after retrieving time from ntpdate.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index aecefc1..f653cd0 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -18,12 +18,13 @@
#include <qpe/global.h>
#include <qpe/timeconversion.h>
#include <qpe/tzselect.h>
#include <qpe/timestring.h>
#include <qpe/qpedialog.h>
#include <qpe/datebookdb.h>
+#include <qpe/datebookmonth.h>
#include <qpe/qcopenvelope_qws.h>
#include <sys/time.h>
#include <time.h>
#include <stdlib.h>
@@ -220,12 +221,16 @@ void Ntp::ntpFinished(OProcess *p)
float timeShift = getTimeShift();
if (timeShift == 0.0) return;
int secsSinceLast = time - lastLookup;
TextLabelNewTime->setText(QDateTime::currentDateTime().toString());
TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds"));
+
+ dateButton->setDate( QDate::currentDate() );
+ timeButton->setTime( QDateTime::currentDateTime() );
+
if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value())
{
cfg.setGroup("lookup_"+QString::number(lookupCount));
lookupCount++;
_shiftPerSec = timeShift / secsSinceLast;
qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec);