Skip to content
Snippets Groups Projects
Commit c744a9d0 authored by Moe Jette's avatar Moe Jette
Browse files

Convert log timestamps to ISO format

parent a8f2d5be
No related branches found
No related tags found
No related merge requests found
...@@ -400,9 +400,15 @@ static char *vxstrfmt(const char *fmt, va_list ap) ...@@ -400,9 +400,15 @@ static char *vxstrfmt(const char *fmt, va_list ap)
case 'T': /* "%T" => "dd Mon yyyy hh:mm:ss off" */ case 'T': /* "%T" => "dd Mon yyyy hh:mm:ss off" */
xstrftimecat(buf, "%a %d %b %Y %H:%M:%S %z"); xstrftimecat(buf, "%a %d %b %Y %H:%M:%S %z");
break; break;
#ifdef USE_ISO_8601
case 'M': /* "%M" => "yyyy-mm-ddThh:mm:ss" */
xstrftimecat(buf, "%Y-%m-%dT%T");
break;
#else
case 'M': /* "%M" => "Mon DD hh:mm:ss" */ case 'M': /* "%M" => "Mon DD hh:mm:ss" */
xstrftimecat(buf, "%b %d %T"); xstrftimecat(buf, "%b %d %T");
break; break;
#endif
case 's': /* "%s" => append string */ case 's': /* "%s" => append string */
/* we deal with this case for efficiency */ /* we deal with this case for efficiency */
if (unprocessed == 0) if (unprocessed == 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment