summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/settime.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/netsystemtime/settime.cpp') (more/less context) (ignore 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
@@ -53,13 +53,13 @@
SetDateTime::SetDateTime(QWidget *parent, const char *name, WFlags f )
: NtpBase( parent, name, true, f )
{
setCaption( tr("System Time") );
-
+ _oldTimeZone="";
QVBoxLayout *vb = new QVBoxLayout( FrameSystemTime, 5 );
// TextLabelMainPredTime = new QLabel( FrameSystemTime );
// vb->addWidget( TextLabelMainPredTime, 1, 0 );
timeButton = new SetTime( FrameSystemTime );
@@ -315,20 +315,19 @@ void SetDateTime::updateSystem()
}
void SetDateTime::tzChange( const QString &tz )
{
// set the TZ get the time and leave gracefully...
- QString strSave;
- strSave = getenv( "TZ" );
+ _oldTimeZone = getenv( "TZ" );
setenv( "TZ", tz, 1 );
QDate d = QDate::currentDate();
// reset the time.
- if ( !strSave.isNull() ) {
- setenv( "TZ", strSave, 1 );
+ if ( !_oldTimeZone.isNull() ) {
+ setenv( "TZ", _oldTimeZone, 1 );
}
dateButton->setDate( d );
updateSystem();
}
void SetDateTime::formatChanged(int i)