comparison pidgin/gtkblist.c @ 17835:751fbc2eff7e

merge of '3b80bf600e31f234766ed90a7bba5ea586178f08' and '3c31f6f6c8e998f6e9c550e05bf5dfdcdc9bb154'
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 11 Jun 2007 13:08:54 +0000
parents 0e445e906cfd 18b62b0fc253
children 452bd3baa9af
comparison
equal deleted inserted replaced
17832:4c05f284253b 17835:751fbc2eff7e
2992 2992
2993 /* Logged In */ 2993 /* Logged In */
2994 signon = purple_presence_get_login_time(presence); 2994 signon = purple_presence_get_login_time(presence);
2995 if (full && PURPLE_BUDDY_IS_ONLINE(b) && signon > 0) 2995 if (full && PURPLE_BUDDY_IS_ONLINE(b) && signon > 0)
2996 { 2996 {
2997 tmp = purple_str_seconds_to_string(time(NULL) - signon); 2997 if (time(NULL) - signon > 63072000 /* 2 years */) {
2998 /*
2999 * Our local clock must be wrong, show the actual
3000 * date instead of "4 days", etc.
3001 */
3002 tmp = g_strdup(purple_date_format_long(localtime(&signon)));
3003 } else
3004 tmp = purple_str_seconds_to_string(time(NULL) - signon);
2998 purple_notify_user_info_add_pair(user_info, _("Logged In"), tmp); 3005 purple_notify_user_info_add_pair(user_info, _("Logged In"), tmp);
2999 g_free(tmp); 3006 g_free(tmp);
3000 } 3007 }
3001 3008
3002 /* Idle */ 3009 /* Idle */