From bed95e5a54b0b47bd2094c1a9d64e756d70c4a1a Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Wed, 10 May 2006 00:10:29 +0000
Subject: [PATCH] Add "T" between date and time in jobcomp/filetxt output.

---
 NEWS                                          | 2 +-
 src/plugins/jobcomp/filetxt/jobcomp_filetxt.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 5576fb42259..fc19dfc33a7 100644
--- a/NEWS
+++ b/NEWS
@@ -18,7 +18,7 @@ documents those changes that are of interest to users and admins.
  -- Bluegene - before assigning a job to a block the plugin will check the bps
     to make sure they aren't in error state.
  -- Change time format in job completion logging (JobCompType=jobcomp/filetxt)
-    from "MM/DD HH:MM:SS" to "YYYY-MM-DD HH:MM:SS", conforming with the ISO8601 
+    from "MM/DD HH:MM:SS" to "YYYY-MM-DDTHH:MM:SS", conforming with the ISO8601 
     standard format.
  
 * Changes in SLURM 1.1.0-pre6
diff --git a/src/plugins/jobcomp/filetxt/jobcomp_filetxt.c b/src/plugins/jobcomp/filetxt/jobcomp_filetxt.c
index 5d9a1154aeb..fc0fce16acc 100644
--- a/src/plugins/jobcomp/filetxt/jobcomp_filetxt.c
+++ b/src/plugins/jobcomp/filetxt/jobcomp_filetxt.c
@@ -170,7 +170,7 @@ _get_user_name(uint32_t user_id, char *user_name, int buf_size)
 }
 
 /*
- * make_time_str - convert time_t to string with "YYYY-MM-DD HH:MM:SS"
+ * make_time_str - convert time_t to string with "YYYY-MM-DDTHH:MM:SS"
  *                 Note this is the ISO8601 standard format 
  * IN time     - a time stamp
  * IN str_size - size of string buffer
@@ -182,7 +182,7 @@ _make_time_str (time_t *time, char *string, int str_size)
 	struct tm time_tm;
 
 	localtime_r (time, &time_tm);
-	snprintf ( string, str_size, "%4.4u-%2.2u-%2.2u %2.2u:%2.2u:%2.2u",
+	snprintf ( string, str_size, "%4.4u-%2.2u-%2.2uT%2.2u:%2.2u:%2.2u",
 		(time_tm.tm_year + 1900), (time_tm.tm_mon+1), time_tm.tm_mday,
 		time_tm.tm_hour, time_tm.tm_min, time_tm.tm_sec);
 }
-- 
GitLab