diff options
-rw-r--r-- | src/fe-common/core/printtext.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/windows.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/fe-common/core/printtext.c b/src/fe-common/core/printtext.c index 40da44e7..812a2607 100644 --- a/src/fe-common/core/printtext.c +++ b/src/fe-common/core/printtext.c @@ -645,7 +645,6 @@ static void newline(WINDOW_REC *window) static char *get_timestamp(TEXT_DEST_REC *dest) { struct tm *tm; - char month[10]; time_t t; int diff; @@ -662,10 +661,9 @@ static char *get_timestamp(TEXT_DEST_REC *dest) } tm = localtime(&t); - strftime(month, sizeof(month)-1, "%b", tm); return output_format_text(dest, IRCTXT_TIMESTAMP, tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec, month); + tm->tm_hour, tm->tm_min, tm->tm_sec); } static char *get_server_tag(TEXT_DEST_REC *dest) diff --git a/src/fe-common/core/windows.c b/src/fe-common/core/windows.c index ba92ffd2..fac70cac 100644 --- a/src/fe-common/core/windows.c +++ b/src/fe-common/core/windows.c @@ -395,11 +395,13 @@ static void sig_server_disconnected(void *server) static void sig_print_text(void) { GSList *tmp; + char month[10]; time_t t; struct tm *tm; t = time(NULL); tm = localtime(&t); + strftime(month, sizeof(month)-1, "%b", tm); if (tm->tm_hour != 0 || tm->tm_min != 0) return; @@ -410,7 +412,7 @@ static void sig_print_text(void) /* day changed, print notice about it to every window */ for (tmp = windows; tmp != NULL; tmp = tmp->next) { printformat_window(tmp->data, MSGLEVEL_NEVER, IRCTXT_DAYCHANGE, - tm->tm_mday, tm->tm_mon+1, 1900+tm->tm_year); + tm->tm_mday, tm->tm_mon+1, 1900+tm->tm_year, month); } } |