From 864b15c0d6c79ec0030f03ec45440c80e2b2141b Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 11 Nov 2019 12:21:17 +0100 Subject: [PATCH] Fix another numeric error in MOTD and use ISO date format (Y-m-d). --- src/modules/motd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/motd.c b/src/modules/motd.c index 5c4e617f8..0397604b8 100644 --- a/src/modules/motd.c +++ b/src/modules/motd.c @@ -92,9 +92,10 @@ CMD_FUNC(cmd_motd) /* tm_year should be zero only if the struct is zero-ed */ if (themotd && themotd->lines && themotd->last_modified.tm_year) { - sendnumericfmt(client, RPL_MOTD, "- %d/%d/%d %d:%02d", themotd->last_modified.tm_mday, - themotd->last_modified.tm_mon + 1, + sendnumericfmt(client, RPL_MOTD, ":- %.04d-%.02d-%.02d %.02d:%02d", themotd->last_modified.tm_year + 1900, + themotd->last_modified.tm_mon + 1, + themotd->last_modified.tm_mday, themotd->last_modified.tm_hour, themotd->last_modified.tm_min); }