summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/settime.cpp
Unidiff
Diffstat (limited to 'noncore/settings/netsystemtime/settime.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/settime.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/noncore/settings/netsystemtime/settime.cpp b/noncore/settings/netsystemtime/settime.cpp
index 36166ae..6a28989 100644
--- a/noncore/settings/netsystemtime/settime.cpp
+++ b/noncore/settings/netsystemtime/settime.cpp
@@ -56,7 +56,7 @@ SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f )
56 : NtpBase( parent, name, true, f ) 56 : NtpBase( parent, name, true, f )
57{ 57{
58 setCaption( tr("System Time") ); 58 setCaption( tr("System Time") );
59 59 _oldTimeZone="";
60 QVBoxLayout *vb = new QVBoxLayout( FrameSystemTime, 5 ); 60 QVBoxLayout *vb = new QVBoxLayout( FrameSystemTime, 5 );
61 61
62// TextLabelMainPredTime = new QLabel( FrameSystemTime ); 62// TextLabelMainPredTime = new QLabel( FrameSystemTime );
@@ -318,14 +318,13 @@ void SetDateTime::updateSystem()
318void SetDateTime::tzChange( const QString &tz ) 318void SetDateTime::tzChange( const QString &tz )
319{ 319{
320 // set the TZ get the time and leave gracefully... 320 // set the TZ get the time and leave gracefully...
321 QString strSave; 321 _oldTimeZone = getenv( "TZ" );
322 strSave = getenv( "TZ" );
323 setenv( "TZ", tz, 1 ); 322 setenv( "TZ", tz, 1 );
324 323
325 QDate d = QDate::currentDate(); 324 QDate d = QDate::currentDate();
326 // reset the time. 325 // reset the time.
327 if ( !strSave.isNull() ) { 326 if ( !_oldTimeZone.isNull() ) {
328 setenv( "TZ", strSave, 1 ); 327 setenv( "TZ", _oldTimeZone, 1 );
329 } 328 }
330 dateButton->setDate( d ); 329 dateButton->setDate( d );
331 updateSystem(); 330 updateSystem();