diff --git a/NEWS b/NEWS index 5938656982eb5c400a318fcaf86c3eb8859afc4e..5d1622cf8fc173516a1a2811374f3adb75b02fe6 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,8 @@ documents those changes that are of interest to users and admins. -- Change SLURM libraries and associated header files from GPL to LGPL licensing. All other SLURM components are still distributed under the GPL license. + -- Time format in sinfo/squeue/smap/sacct changed from D:HH:MM:SS to + D-HH:MM:SS per POSIX standards document. * Changes in SLURM 0.7.0-pre3 ============================= diff --git a/src/sacct/sacct.c b/src/sacct/sacct.c index 554b7e2d8526c38636e161bde72c49c0c7f8c462..2d6a22b67e5d80325cc4ea05775d0abeadf3409d 100644 --- a/src/sacct/sacct.c +++ b/src/sacct/sacct.c @@ -1108,7 +1108,7 @@ char *elapsedTime(long secs, long usecs) minutes = res.quot; seconds = res.rem; if (days) { - snprintf(daybuf, sizeof(daybuf), "%d:", days); + snprintf(daybuf, sizeof(daybuf), "%d-", days); snprintf(hourbuf, sizeof(hourbuf), "%02d:", hours); } else if (hours) snprintf(hourbuf, sizeof(hourbuf), "%2d:", hours); diff --git a/src/sinfo/print.c b/src/sinfo/print.c index 8197c6412079e7188d6c792aaa6497a565f119e1..8951db821690e87a1b0d907cb8b10922100db2d1 100644 --- a/src/sinfo/print.c +++ b/src/sinfo/print.c @@ -142,7 +142,7 @@ static int _print_secs(long time, int width, bool right, bool cut_output) if (days) snprintf(str, FORMAT_STRING_SIZE, - "%ld:%2.2ld:%2.2ld:%2.2ld", + "%ld-%2.2ld:%2.2ld:%2.2ld", days, hours, minutes, seconds); else if (hours) snprintf(str, FORMAT_STRING_SIZE, diff --git a/src/smap/opts.c b/src/smap/opts.c index 94beea99be51baea334e1fa6d2ae77414a02332c..d71a2bf800d61a129408ca6a3097774e410bde7e 100644 --- a/src/smap/opts.c +++ b/src/smap/opts.c @@ -124,7 +124,7 @@ extern void snprint_time(char *buf, size_t buf_size, time_t time) if (days) snprintf(buf, buf_size, - "%ld:%2.2ld:%2.2ld:%2.2ld", + "%ld-%2.2ld:%2.2ld:%2.2ld", days, hours, minutes, seconds); else if (hours) snprintf(buf, buf_size, diff --git a/src/squeue/print.c b/src/squeue/print.c index 2efe4962c425899809599e40bfb9a5c2643b6a65..07c35b11cbef2b1a8f462e3cf9693dbc7db4edb0 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -205,7 +205,7 @@ int _print_secs(long time, int width, bool right, bool cut_output) if (days) snprintf(str, FORMAT_STRING_SIZE, - "%ld:%2.2ld:%2.2ld:%2.2ld", + "%ld-%2.2ld:%2.2ld:%2.2ld", days, hours, minutes, seconds); else if (hours) snprintf(str, FORMAT_STRING_SIZE,