Skip to content

Commit

Permalink
Safer way of (re)setting the locale for strftime
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Jun 29, 2015
1 parent 01003bc commit ba25d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/binary/Builtin.cc
Expand Up @@ -672,8 +672,8 @@ extern "C" {
try
{
// Since std::put_time is not implemented in GCC4.9, we'll use
// locale::global and strftime instead of facets
std::locale::global(std::locale(""));
// setlocale and strftime instead of facets
setlocale(LC_TIME,"");
}
catch (const std::runtime_error &error)
{
Expand Down

0 comments on commit ba25d21

Please sign in to comment.