From c744a9d0e255c31cf087d358d384ec813d2cf06d Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Wed, 17 Dec 2008 17:04:44 +0000 Subject: [PATCH] Convert log timestamps to ISO format --- src/common/log.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/log.c b/src/common/log.c index 0c1d8141b12..0afda893dab 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -400,9 +400,15 @@ static char *vxstrfmt(const char *fmt, va_list ap) case 'T': /* "%T" => "dd Mon yyyy hh:mm:ss off" */ xstrftimecat(buf, "%a %d %b %Y %H:%M:%S %z"); 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" */ xstrftimecat(buf, "%b %d %T"); break; +#endif case 's': /* "%s" => append string */ /* we deal with this case for efficiency */ if (unprocessed == 0) -- GitLab