diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2007-12-16 22:04:10 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2007-12-16 22:04:10 +0100 |
commit | 33cac975a40690c1c2a40a5e3b9d65c23c49893a (patch) | |
tree | be809202a58b8c4adbe3b9991135986ce0be9074 | |
parent | fb36492f9c1ddc58b8c164c32f7a437b60d5453c (diff) |
add "local time" info output
thanks Cristobal Palmer (tarheelcoxn) for testing :)
-rw-r--r-- | skype/skype.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/skype/skype.c b/skype/skype.c index f83d6d1d..0bbfbcb1 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -352,8 +352,12 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c { if(strlen(sd->info_tz)) { - /* this is currently buggy, says gmt+12 when I set gmt+1 - g_string_append_printf(st, "Local Time: %s\n", sd->info_tz); */ + char ib[256]; + time_t t = time(NULL); + t += atoi(sd->info_tz)-(60*60*24); + struct tm *gt = gmtime(&t); + strftime(ib, 256, "%H:%M:%S", gt); + g_string_append_printf(st, "Local Time: %s\n", ib); } g_free(sd->info_tz); } |