summaryrefslogtreecommitdiff
authorzecke <zecke>2004-10-22 15:15:01 (UTC)
committer zecke <zecke>2004-10-22 15:15:01 (UTC)
commitf2a2eca1870e1fd88c82a6ccb039610949daa72c (patch) (side-by-side diff)
tree9ca204b4cddfee6272cfc8d5e55b27b60a0743d0
parent0a3ab70a5be70bb04691a2a566ce63719e57f83e (diff)
downloadopie-f2a2eca1870e1fd88c82a6ccb039610949daa72c.zip
opie-f2a2eca1870e1fd88c82a6ccb039610949daa72c.tar.gz
opie-f2a2eca1870e1fd88c82a6ccb039610949daa72c.tar.bz2
Write the hardware clock after setting the datetime. This way we can
gurantee it is set while opiealarm has not run.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/timetabwidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/settings/netsystemtime/timetabwidget.cpp b/noncore/settings/netsystemtime/timetabwidget.cpp
index 1ea460e..3cc127d 100644
--- a/noncore/settings/netsystemtime/timetabwidget.cpp
+++ b/noncore/settings/netsystemtime/timetabwidget.cpp
@@ -199,16 +199,22 @@ void TimeTabWidget::setSystemTime( const QDateTime &dt )
{
struct timeval myTv;
int t = TimeConversion::toUTC( dt );
myTv.tv_sec = t;
myTv.tv_usec = 0;
if ( myTv.tv_sec != -1 )
::settimeofday( &myTv, 0 );
+
+ /*
+ * Commit the datetime to the 'hardware'
+ * as Global::writeHWClock() is a NOOP with Opie Alarm
+ */
+ system("/sbin/hwclock --systohc --utc");
}
}
void TimeTabWidget::slotUse12HourTime( int i )
{
use12HourTime = (i == 1);
cbAmpm->setEnabled( use12HourTime );