Only use the C.UTF-8 LANG value

This commit is contained in:
louiz’
2017-02-01 18:37:51 +01:00
parent 5eb5e9e0af
commit 479b718993
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -331,8 +331,8 @@ if(NOT DEFINED SERVICE_GROUP)
endif() endif()
configure_file(unit/biboumi.service.cmake biboumi.service) configure_file(unit/biboumi.service.cmake biboumi.service)
# The date MUST be in english format # Force the format of the date output
set(ENV{LANG} "en_US.utf-8") set(ENV{LANG} "C.UTF-8")
execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
unset(ENV{LANG}) unset(ENV{LANG})
+1 -1
View File
@@ -24,7 +24,7 @@ std::time_t parse_datetime(const std::string& stamp)
std::tm t = {}; std::tm t = {};
#ifdef HAS_GET_TIME #ifdef HAS_GET_TIME
std::istringstream ss(stamp); std::istringstream ss(stamp);
ss.imbue(std::locale("en_US.UTF-8")); ss.imbue(std::locale("C.UTF-8"));
std::string timezone; std::string timezone;
ss >> std::get_time(&t, format) >> timezone; ss >> std::get_time(&t, format) >> timezone;