Changeset 33cac97


Ignore:
Timestamp:
2007-12-16T21:04:10Z (16 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
969f643
Parents:
fb36492
Message:

add "local time" info output
thanks Cristobal Palmer (tarheelcoxn) for testing :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skype.c

    rfb36492 r33cac97  
    353353                                                if(strlen(sd->info_tz))
    354354                                                {
    355                                                         /* this is currently buggy, says gmt+12 when I set gmt+1
    356                                                         g_string_append_printf(st, "Local Time: %s\n", sd->info_tz); */
     355                                                        char ib[256];
     356                                                        time_t t = time(NULL);
     357                                                        t += atoi(sd->info_tz)-(60*60*24);
     358                                                        struct tm *gt = gmtime(&t);
     359                                                        strftime(ib, 256, "%H:%M:%S", gt);
     360                                                        g_string_append_printf(st, "Local Time: %s\n", ib);
    357361                                                }
    358362                                                g_free(sd->info_tz);
Note: See TracChangeset for help on using the changeset viewer.