author | tille <tille> | 2002-06-25 13:39:50 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-25 13:39:50 (UTC) |
commit | a3f1ec6a75ea762a54ed218f205956ca28d61599 (patch) (unidiff) | |
tree | 60d6911a808803dcfed90e7887a901c52b3443b0 /noncore/settings/netsystemtime/settime.cpp | |
parent | 8501705e4e50602aaabe9877e6d8821555e3a05a (diff) | |
download | opie-a3f1ec6a75ea762a54ed218f205956ca28d61599.zip opie-a3f1ec6a75ea762a54ed218f205956ca28d61599.tar.gz opie-a3f1ec6a75ea762a54ed218f205956ca28d61599.tar.bz2 |
doing something ;)
Diffstat (limited to 'noncore/settings/netsystemtime/settime.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/settime.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp index dac5bd4..01268c9 100644 --- a/noncore/settings/netsystemtime/settime.cpp +++ b/noncore/settings/netsystemtime/settime.cpp | |||
@@ -210,6 +210,2 @@ void SetDateTime::commitTime() | |||
210 | { | 210 | { |
211 | Config cfg("ntp",Config::User); | ||
212 | cfg.setGroup("lookups"); | ||
213 | int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); | ||
214 | cfg.writeEntry("time", time); | ||
215 | tz->setFocus(); | 211 | tz->setFocus(); |
@@ -229,5 +225,13 @@ void SetDateTime::commitTime() | |||
229 | 225 | ||
230 | if ( dt.isValid() ) { | 226 | if ( dt.isValid() ) setTime(dt); |
227 | } | ||
228 | |||
229 | void SetDateTime::setTime(QDateTime dt) | ||
230 | { | ||
231 | Config cfg("ntp",Config::User); | ||
232 | cfg.setGroup("correction"); | ||
233 | int t = TimeConversion::toUTC(dt); | ||
231 | struct timeval myTv; | 234 | struct timeval myTv; |
232 | myTv.tv_sec = TimeConversion::toUTC( dt ); | 235 | myTv.tv_sec = t; |
236 | cfg.writeEntry("time", t ); | ||
233 | myTv.tv_usec = 0; | 237 | myTv.tv_usec = 0; |
@@ -241,5 +245,3 @@ void SetDateTime::commitTime() | |||
241 | DateBookDB db; | 245 | DateBookDB db; |
242 | } else { | 246 | |
243 | qWarning( "Invalid date/time" ); | ||
244 | } | ||
245 | // set the timezone for everyone else... | 247 | // set the timezone for everyone else... |