Commit e60ea849 e60ea849c473ce8cc06c85447bd797aa3ea63e67 by Sergey Poznyakoff

(mu_strftime): New function

1 parent bc30c7ee
......@@ -145,6 +145,10 @@ extern int mu_is_proto (const char *p);
extern int mu_mh_delim (const char *str);
extern size_t mu_strftime (char *s, size_t max, const char *format,
const struct tm *tm);
#ifdef __cplusplus
}
#endif
......
......@@ -1354,4 +1354,15 @@ __argp_base_name (const char *arg)
return p ? p + 1 : arg;
}
/* A locale-independent version of strftime */
size_t
mu_strftime (char *s, size_t max, const char *format, const struct tm *tm)
{
size_t size;
mu_set_locale ("C");
size = strftime(s, max, format, tm);
mu_restore_locale ();
return size;
}
......