sec = (time_t) (t / USEC_PER_SEC);
- if (strftime(buf, l, "%a, %d %b %Y %H:%M:%S %z", localtime_r(&sec, &tm)) <= 0)
+ if (strftime(buf, l, "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm)) <= 0)
return NULL;
return buf;
assert(p);
for (t = p; *t; t++) {
- if (*t < ' ')
+ if (*t > 0 && *t < ' ')
return false;
if (strchr("\\\"\'", *t))