properly pass current locale to *_l functions when used internally
[musl] / src / time / strftime.c
index 75ebca6..794fbe1 100644 (file)
@@ -5,6 +5,7 @@
 #include <locale.h>
 #include <time.h>
 #include <limits.h>
+#include "locale_impl.h"
 #include "libc.h"
 #include "time_impl.h"
 
@@ -263,7 +264,7 @@ size_t __strftime_l(char *restrict s, size_t n, const char *restrict f, const st
 
 size_t strftime(char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm)
 {
-       return __strftime_l(s, n, f, tm, 0);
+       return __strftime_l(s, n, f, tm, CURRENT_LOCALE);
 }
 
 weak_alias(__strftime_l, strftime_l);