mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
Fix wrong timestamps by setting the TZ variable from system time zone and with a fix from SDK (Event creation time that should comes from SOCI).
This commit is contained in:
parent
6ae6994a5f
commit
c0621a1bf9
2 changed files with 14 additions and 1 deletions
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <QSettings>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#endif // ifdef Q_OS_WIN
|
||||
#include <QCommandLineParser>
|
||||
#include <QDir>
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 94f3bbb6f08362f004919aa67d1693c275492129
|
||||
Subproject commit 3d12b0566b28082bedf77ca54d7547536cc633fc
|
||||
Loading…
Add table
Reference in a new issue