diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d934ef50e4a40f440f91303d5524f6e655a7a60..1766e583a494486bc5a23de4c6f6651f4aaa6cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -331,8 +331,8 @@ if(NOT DEFINED SERVICE_GROUP) endif() configure_file(unit/biboumi.service.cmake biboumi.service) -# The date MUST be in english format -set(ENV{LANG} "en_US.utf-8") +# Force the format of the date output +set(ENV{LANG} "C.UTF-8") execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) unset(ENV{LANG}) diff --git a/louloulibs/utils/time.cpp b/louloulibs/utils/time.cpp index e3c49ed9fb92226927697b6b08d058a6805d6dd0..d9c4381c52ea609789a203aaa7ac234374949087 100644 --- a/louloulibs/utils/time.cpp +++ b/louloulibs/utils/time.cpp @@ -24,7 +24,7 @@ std::time_t parse_datetime(const std::string& stamp) std::tm t = {}; #ifdef HAS_GET_TIME std::istringstream ss(stamp); - ss.imbue(std::locale("en_US.UTF-8")); + ss.imbue(std::locale("C.UTF-8")); std::string timezone; ss >> std::get_time(&t, format) >> timezone;