aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/clock/LClock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/panel-plugins/clock/LClock.cpp')
-rw-r--r--lumina-desktop/panel-plugins/clock/LClock.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lumina-desktop/panel-plugins/clock/LClock.cpp b/lumina-desktop/panel-plugins/clock/LClock.cpp
index e91a3a71..79cae84b 100644
--- a/lumina-desktop/panel-plugins/clock/LClock.cpp
+++ b/lumina-desktop/panel-plugins/clock/LClock.cpp
@@ -35,6 +35,7 @@ LClock::~LClock(){
void LClock::updateTime(){
QDateTime CT = QDateTime::currentDateTime();
+ if(useTZ){ CT = CT.toTimeZone(TZ); }
//Now update the display
QString label;
if(deftime){ label = CT.time().toString(Qt::SystemLocaleShortDate) ; }
@@ -53,5 +54,8 @@ void LClock::updateFormats(){
datefmt = LSession::handle()->sessionSettings()->value("DateFormat","").toString();
deftime = timefmt.simplified().isEmpty();
defdate = datefmt.simplified().isEmpty();
+ useTZ = LSession::handle()->sessionSettings()->value("CustomTimeZone",false).toBool();
+ if(useTZ){ TZ = QTimeZone( LSession::handle()->sessionSettings()->value("TimeZoneByteCode", QByteArray()).toByteArray() ); }
+
}
bgstack15