X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Ffmt_date.c;h=ff0df01be8ad3816d31ed7981d14a90aa36210c5;hb=ba97383f988078875e8982419c07886220814b46;hp=3c8210f9ae100a47e3419b0c01f035863da54f98;hpb=b687d5511e79397474991faf45e7aa994cc14d12;p=citadel.git diff --git a/webcit/fmt_date.c b/webcit/fmt_date.c index 3c8210f9a..ff0df01be 100644 --- a/webcit/fmt_date.c +++ b/webcit/fmt_date.c @@ -72,12 +72,18 @@ void fmt_date(char *buf, time_t thetime, int brief) if ((tm.tm_year == today_tm.tm_year) &&(tm.tm_mon == today_tm.tm_mon) &&(tm.tm_mday == today_tm.tm_mday)) { - wc_strftime(buf, 32, "%l:%M%p", &tm); + if (time_format == WC_TIMEFORMAT_24) + wc_strftime(buf, 32, "%k:%M", &tm); + else + wc_strftime(buf, 32, "%l:%M%p", &tm); } /** Otherwise, for messages up to 6 months old, show the * month and day, and the time */ else if (today_timet - thetime < 15552000) { - wc_strftime(buf, 32, "%b %d %l:%M%p", &tm); + if (time_format == WC_TIMEFORMAT_24) + wc_strftime(buf, 32, "%b %d %k:%M", &tm); + else + wc_strftime(buf, 32, "%b %d %l:%M%p", &tm); } /** older than 6 months, show only the date */ else {