From cf9aa011098f0ce60e632c441c823611dfe366e9 Mon Sep 17 00:00:00 2001 From: jhs507 Date: Mon, 18 Jul 2022 15:07:02 -0600 Subject: [PATCH] Added a warning for CLI mode if env TZ is not set. --- crhmcode/src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crhmcode/src/main.cpp b/crhmcode/src/main.cpp index 3cd85838b..4585137a1 100644 --- a/crhmcode/src/main.cpp +++ b/crhmcode/src/main.cpp @@ -9,6 +9,11 @@ int main(int argc, char *argv[]) arguments->readCommandLine(argc, argv); arguments->validate(); + int i = system("test -z $TZ && echo \"Enviroment variable TZ is not set this" + " may negatively impact performance.\n Set TZ to :[Timezone]\n You can find" + " the timezone to set TZ to in /etc/timezone on most systems.\n \" " + "|| echo \"TZ is set to $TZ\n\""); + //Create main object with the given arguments. CRHMmain* m = new CRHMmain(arguments); @@ -21,7 +26,7 @@ int main(int argc, char *argv[]) } else { - std::cout << "Error encountered while loading the project. Check log file for more detail."; + std::cout << "Error encountered while loading the project. Check log file for more detail.\n"; } }