summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--handle.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/handle.c b/handle.c
index cec823a..fd8b25f 100644
--- a/handle.c
+++ b/handle.c
@@ -498,14 +498,16 @@ static void handleReplyWhoisIdle(struct Message *msg) {
 			}
 		}
 	}
-	time_t signon = (msg->params[3] ? strtoul(msg->params[3], NULL, 10) : 0);
+	char signon[sizeof("0000-00-00 00:00:00")];
+	time_t time = (msg->params[3] ? strtol(msg->params[3], NULL, 10) : 0);
+	strftime(signon, sizeof(signon), "%F %T", localtime(&time));
 	uiFormat(
 		Network, Warm, tagTime(msg),
-		"\3%02d%s\3\tis idle for %lu %s%s%s%.*s",
+		"\3%02d%s\3\tis idle for %lu %s%s%s%s",
 		completeColor(Network, msg->params[1]), msg->params[1],
 		idle, unit, (idle != 1 ? "s" : ""),
-		(signon ? ", signed on " : ""),
-		24, (signon ? ctime(&signon) : "")
+		(msg->params[3] ? ", signed on " : ""),
+		(msg->params[3] ? signon : "")
 	);
 }
 
class='logmsg'> 2020-04-26Use %R for RFC numbers in STANDARDS sectionJune McEnroe 2020-04-26Add mailto spec to STANDARDSJune McEnroe 2020-04-26Increase space between nav itemsJune McEnroe 2020-04-26Add mailto address for the archiveJune McEnroe 2020-04-26Put dates on new lines in indexJune McEnroe 2020-04-26Include <> around Message-Id in mailto: URLsJune McEnroe 2020-04-26Add link to index on thread pagesJune McEnroe 2020-04-26Fall back to Content-Type name parameter for attachmentsJune McEnroe 2020-04-26Remove margins in article.message headerJune McEnroe 2020-04-26Generate index.atomJune McEnroe 2020-04-26Generate XHTML content in Atom entriesJune McEnroe 2020-04-25Style index pageJune McEnroe 2020-04-25Render index.htmlJune McEnroe 2020-04-25Wrap <summary> replies count in <data>June McEnroe 2020-04-25Accumulate thread envelopes before concatenationJune McEnroe 2020-04-24Free envelope in concatDataJune McEnroe 2020-04-24Use replyTo address in mailto:June McEnroe 2020-04-23Wrap quoted lines in <q>June McEnroe