Commit 835c650e authored by louiz’'s avatar louiz’

Actually, just use the C locale for the date formats

We don’t need any UTF-8 support here, and it’s more portable
parent 479b7189
...@@ -332,7 +332,7 @@ endif() ...@@ -332,7 +332,7 @@ endif()
configure_file(unit/biboumi.service.cmake biboumi.service) configure_file(unit/biboumi.service.cmake biboumi.service)
# Force the format of the date output # Force the format of the date output
set(ENV{LANG} "C.UTF-8") set(ENV{LANG} "C")
execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE execute_process(COMMAND "date" "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE
unset(ENV{LANG}) unset(ENV{LANG})
...@@ -24,7 +24,7 @@ std::time_t parse_datetime(const std::string& stamp) ...@@ -24,7 +24,7 @@ std::time_t parse_datetime(const std::string& stamp)
std::tm t = {}; std::tm t = {};
std::istringstream ss(stamp); std::istringstream ss(stamp);
ss.imbue(std::locale("C.UTF-8")); ss.imbue(std::locale("C"));
std::string timezone; std::string timezone;
ss >> std::get_time(&t, format) >> timezone; ss >> std::get_time(&t, format) >> timezone;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment