From 4f49b375e3d7697eb472e106e74d0c6773a79144 Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Thu, 26 Sep 2002 19:06:41 +0000
Subject: [PATCH] Change time format to look like that of squeue (with seconds
 added). Convert squeue time stamp from GMT to local time and correct month
 format (add 1).

---
 src/squeue/print.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/squeue/print.c b/src/squeue/print.c
index c63e97b404b..8a2257ede1e 100644
--- a/src/squeue/print.c
+++ b/src/squeue/print.c
@@ -169,14 +169,15 @@ _print_time( time_t t, int level, int width, bool right_justify )
 	struct tm time;
 	char str[FORMAT_STRING_SIZE];
 	
-	gmtime_r( &t, &time );
+	localtime_r( &t, &time );
 	
 	switch ( level )
 	{
 		case 1:
 		case 2:
 		default:
-			snprintf(str, FORMAT_STRING_SIZE, "%.2u-%.2u-%.2u:%.2u", time.tm_mon ,time.tm_mday ,time.tm_hour, time.tm_min);
+			snprintf(str, FORMAT_STRING_SIZE, "%2.2u/%2.2u-%2.2u:%2.2u", 
+				(time.tm_mon+1) ,time.tm_mday ,time.tm_hour, time.tm_min);
 			break;
 	}
 
-- 
GitLab