comparison src/gtkconv.c @ 13104:e1e5462b7d81

[gaim-migrate @ 15466] Rework lots of date parsing. I either introduced a whole lot of bugs, or I've made sure all dates are localized properly now. Only time will tell which it is... ;) committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 02 Feb 2006 19:50:51 +0000
parents 0aa231ebbfd5
children a0a4b44239e8
comparison
equal deleted inserted replaced
13103:a6811e213977 13104:e1e5462b7d81
4664 mdate = gaim_signal_emit_return_1(gaim_gtk_conversations_get_handle(), 4664 mdate = gaim_signal_emit_return_1(gaim_gtk_conversations_get_handle(),
4665 "conversation-timestamp", 4665 "conversation-timestamp",
4666 conv, &tm); 4666 conv, &tm);
4667 if (mdate == NULL) 4667 if (mdate == NULL)
4668 { 4668 {
4669 char buf[64];
4670
4671 if (time(NULL) > mtime + 20*60) /* show date if older than 20 minutes */ 4669 if (time(NULL) > mtime + 20*60) /* show date if older than 20 minutes */
4672 strftime(buf, sizeof(buf), "%x %X", &tm); 4670 mdate = g_strdup(gaim_date_format_long(&tm));
4673 else 4671 else
4674 strftime(buf, sizeof(buf), "%X", &tm); 4672 mdate = g_strdup(gaim_time_format(&tm));
4675
4676 mdate = g_strdup(buf);
4677 } 4673 }
4678 4674
4679 if(gc) 4675 if(gc)
4680 sml_attrib = g_strdup_printf("sml=\"%s\"", 4676 sml_attrib = g_strdup_printf("sml=\"%s\"",
4681 gaim_account_get_protocol_name(conv->account)); 4677 gaim_account_get_protocol_name(conv->account));