(but to be honest I have no idea whether or not this path is
ever used... it seems quite bizarre)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92269
13f79535-47bb-0310-9956-
ffa450edef68
static void mprint(request_rec *r, union VALUETYPE *p, struct magic *m)
{
- char *pp, *rt;
+ char *pp;
unsigned long v;
+ char time_str[APR_CTIME_LEN];
switch (m->type) {
case BYTE:
case DATE:
case BEDATE:
case LEDATE:
- /* XXX: not multithread safe */
- pp = ctime((time_t *) & p->l);
- if ((rt = strchr(pp, '\n')) != NULL)
- *rt = '\0';
+ apr_ctime(time_str, APR_USEC_PER_SEC * (apr_time_t)*(time_t *)&p->l);
+ pp = time_str;
(void) magic_rsl_printf(r, m->desc, pp);
return;
default: