diff --git a/linphone-app/src/app/App.cpp b/linphone-app/src/app/App.cpp index d24d02437..45da5437a 100644 --- a/linphone-app/src/app/App.cpp +++ b/linphone-app/src/app/App.cpp @@ -21,6 +21,8 @@ #ifdef Q_OS_WIN #include +#include +#include #endif // ifdef Q_OS_WIN #include #include @@ -198,6 +200,17 @@ App::App (int &argc, char *argv[]) : SingleApplication(argc, argv, true, Mode::U setWindowIcon(QIcon(Constants::WindowIconPath)); + char * tz = getenv("TZ"); + if(!tz){// If not set, set the environement variable for uses of mktime from the SDK. +#ifdef Q_OS_WIN + _putenv(("TZ="+QTimeZone::systemTimeZoneId().toStdString()).c_str()); + _tzset(); +#else + setenv("TZ", QTimeZone::systemTimeZoneId().toStdString().c_str(), 1); + tzset(); +#endif + } + createParser(); mParser->process(*this); diff --git a/linphone-sdk b/linphone-sdk index 94f3bbb6f..3d12b0566 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit 94f3bbb6f08362f004919aa67d1693c275492129 +Subproject commit 3d12b0566b28082bedf77ca54d7547536cc633fc