Mercurial > pidgin.yaz
comparison pidgin/gtkblist.c @ 18241:83ea1733979b
This is a less dumb way to make sure we don't wrap
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 23 Jun 2007 18:53:14 +0000 |
parents | e3a4ed0febd2 |
children | 51ebbe199514 |
comparison
equal
deleted
inserted
replaced
18240:bc4518599c10 | 18241:83ea1733979b |
---|---|
2974 | 2974 |
2975 /* Logged In */ | 2975 /* Logged In */ |
2976 signon = purple_presence_get_login_time(presence); | 2976 signon = purple_presence_get_login_time(presence); |
2977 if (full && PURPLE_BUDDY_IS_ONLINE(b) && signon > 0) | 2977 if (full && PURPLE_BUDDY_IS_ONLINE(b) && signon > 0) |
2978 { | 2978 { |
2979 if (time(NULL) - signon > 63072000 /* 2 years */) { | 2979 if (signon > time(NULL)) { |
2980 /* | 2980 /* |
2981 * Our local clock must be wrong, show the actual | 2981 * They signed on in the future?! Our local clock |
2982 * date instead of "4 days", etc. | 2982 * must be wrong, show the actual date instead of |
2983 * "4 days", etc. | |
2983 */ | 2984 */ |
2984 tmp = g_strdup(purple_date_format_long(localtime(&signon))); | 2985 tmp = g_strdup(purple_date_format_long(localtime(&signon))); |
2985 } else | 2986 } else |
2986 tmp = purple_str_seconds_to_string(time(NULL) - signon); | 2987 tmp = purple_str_seconds_to_string(time(NULL) - signon); |
2987 purple_notify_user_info_add_pair(user_info, _("Logged In"), tmp); | 2988 purple_notify_user_info_add_pair(user_info, _("Logged In"), tmp); |