Mercurial > pidgin.yaz
diff 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 |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Mon Jun 11 01:44:07 2007 +0000 +++ b/pidgin/gtkblist.c Mon Jun 11 13:08:54 2007 +0000 @@ -2994,7 +2994,14 @@ signon = purple_presence_get_login_time(presence); if (full && PURPLE_BUDDY_IS_ONLINE(b) && signon > 0) { - tmp = purple_str_seconds_to_string(time(NULL) - signon); + if (time(NULL) - signon > 63072000 /* 2 years */) { + /* + * Our local clock must be wrong, show the actual + * date instead of "4 days", etc. + */ + tmp = g_strdup(purple_date_format_long(localtime(&signon))); + } else + tmp = purple_str_seconds_to_string(time(NULL) - signon); purple_notify_user_info_add_pair(user_info, _("Logged In"), tmp); g_free(tmp); }