diff --git a/src/modules/locale/SetTimezoneJob.cpp b/src/modules/locale/SetTimezoneJob.cpp index 1602946a3..485e6a96d 100644 --- a/src/modules/locale/SetTimezoneJob.cpp +++ b/src/modules/locale/SetTimezoneJob.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Teo Mrnjavac + * Copyright 2015, Rohan Garg * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,6 +46,14 @@ SetTimezoneJob::prettyName() const Calamares::JobResult SetTimezoneJob::exec() { + int ec = CalamaresUtils::System::instance()-> + targetEnvCall( { "timedatectl", + "set-timezone", + m_region + '/' + m_zone } ); + + if ( !ec ) + return Calamares::JobResult::ok(); + QString localtimeSlink( "/etc/localtime" ); QString zoneinfoPath( "/usr/share/zoneinfo" ); zoneinfoPath.append( QDir::separator() + m_region ); @@ -62,7 +71,7 @@ SetTimezoneJob::exec() "-f", localtimeSlink } ); - int ec = CalamaresUtils::System::instance()-> + ec = CalamaresUtils::System::instance()-> targetEnvCall( { "ln", "-s", zoneinfoPath,