]> code.citadel.org Git - citadel.git/blobdiff - webcit/fmt_date.c
Began moving date outputs to strftime_l()
[citadel.git] / webcit / fmt_date.c
index 0475f91cf3b0c3a91c410078d5ed72874e769b19..cdc4f18030cce10ff191afeb6284ead05d7e457c 100644 (file)
@@ -109,22 +109,7 @@ void fmt_date(char *buf, time_t thetime, int brief)
                }
        }
        else {
-               if (!strcasecmp(calhourformat, "24")) {
-                       sprintf(buf, "%s %d %d %2d:%02d",
-                               ascmonths[tm.tm_mon],
-                               tm.tm_mday,
-                               tm.tm_year + 1900,
-                               tm.tm_hour, tm.tm_min
-                       );
-               }
-               else {
-                       sprintf(buf, "%s %d %d %2d:%02d%s",
-                               ascmonths[tm.tm_mon],
-                               tm.tm_mday,
-                               tm.tm_year + 1900,
-                               hour, tm.tm_min, ((tm.tm_hour >= 12) ? "pm" : "am")
-                       );
-               }
+               strftime_l(buf, 32, "%c", &tm, wc_locales[WC->selected_language]);
        }
 }