diff options
| -rw-r--r-- | src/time/strftime.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/time/strftime.c b/src/time/strftime.c index 61527ca9..9d9f10e1 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -17,6 +17,9 @@ size_t strftime(char * restrict s, size_t maxsize, const char * restrict format, ASSERT_NONNULL(timeptr); lc = __libc(THREAD_LOCALE); + if (lc->time[0] == '\0') { + lc = __libc(GLOBAL_LOCALE); + } for (i = 0; format[i] != '\0' && converted < maxsize; i++) { if (format[i] != '%') { |
