comparison src/log.c @ 9592:9c78aaa4117e

[gaim-migrate @ 10435] " This patch moves from the localized date format %c to the ISO date format as the user log does. This makes logs locale independent." --Eduardo P?rez committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 25 Jul 2004 16:19:44 +0000
parents db95a6641ec1
children 1b13160bf5a4
comparison
equal deleted inserted replaced
9591:bc910eb2679f 9592:9c78aaa4117e
558 return; 558 return;
559 559
560 gaim_markup_html_to_xhtml(message, &msg_fixed, NULL); 560 gaim_markup_html_to_xhtml(message, &msg_fixed, NULL);
561 561
562 if(log->type == GAIM_LOG_SYSTEM){ 562 if(log->type == GAIM_LOG_SYSTEM){
563 strftime(date, sizeof(date), "%c", localtime(&time)); 563 strftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S", localtime(&time));
564 fprintf(data->file, "---- %s @ %s ----<br/>\n", msg_fixed, date); 564 fprintf(data->file, "---- %s @ %s ----<br/>\n", msg_fixed, date);
565 } else { 565 } else {
566 strftime(date, sizeof(date), "%H:%M:%S", localtime(&time)); 566 strftime(date, sizeof(date), "%H:%M:%S", localtime(&time));
567 if (type & GAIM_MESSAGE_SYSTEM) 567 if (type & GAIM_MESSAGE_SYSTEM)
568 fprintf(data->file, "<font size=\"2\">(%s)</font><b> %s</b><br/>\n", date, msg_fixed); 568 fprintf(data->file, "<font size=\"2\">(%s)</font><b> %s</b><br/>\n", date, msg_fixed);
747 return; 747 return;
748 748
749 stripped = gaim_markup_strip_html(message); 749 stripped = gaim_markup_strip_html(message);
750 750
751 if(log->type == GAIM_LOG_SYSTEM){ 751 if(log->type == GAIM_LOG_SYSTEM){
752 strftime(date, sizeof(date), "%c", localtime(&time)); 752 strftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S", localtime(&time));
753 fprintf(data->file, "---- %s @ %s ----\n", stripped, date); 753 fprintf(data->file, "---- %s @ %s ----\n", stripped, date);
754 } else { 754 } else {
755 strftime(date, sizeof(date), "%H:%M:%S", localtime(&time)); 755 strftime(date, sizeof(date), "%H:%M:%S", localtime(&time));
756 if (type & GAIM_MESSAGE_SEND || 756 if (type & GAIM_MESSAGE_SEND ||
757 type & GAIM_MESSAGE_RECV) { 757 type & GAIM_MESSAGE_RECV) {