diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2007-12-16 03:55:56 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2007-12-16 03:55:56 +0100 |
commit | 5b9847d174938e61a76bb19da33ec28f2ca3b931 (patch) | |
tree | 27d60f17f23688e232bf3b5dfa5fd0fb4a992e56 /skype/skype.c | |
parent | f9c3e7b63c2847e381f29572820c4415afb3efd5 (diff) |
fixed age output
Diffstat (limited to 'skype/skype.c')
-rw-r--r-- | skype/skype.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/skype/skype.c b/skype/skype.c index f0f608a7..9f1ee607 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -378,7 +378,12 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c strptime(sd->info_birthday, "%Y%m%d", &tm); strftime(ib, 256, "%B %d, %Y", &tm); g_string_append_printf(st, "Birthday: %s\n", ib); - g_string_append_printf(st, "Age:\n"); + + strftime(ib, 256, "%Y", &tm); + int year = atoi(ib); + time_t t = time(NULL); + struct tm *lt = localtime(&t); + g_string_append_printf(st, "Age: %d\n", lt->tm_year+1900-year); } g_free(sd->info_birthday); } |