From: <ro...@us...> - 2006-07-02 18:33:19
|
Revision: 16397 Author: roast Date: 2006-07-02 11:33:13 -0700 (Sun, 02 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16397&view=rev Log Message: ----------- wingaim port fixes: localtime(NULL) crashes windows; %F/%T are linux specific. Modified Paths: -------------- branches/soc-2006-file-loggers/src/log.c Modified: branches/soc-2006-file-loggers/src/log.c =================================================================== --- branches/soc-2006-file-loggers/src/log.c 2006-07-02 16:02:29 UTC (rev 16396) +++ branches/soc-2006-file-loggers/src/log.c 2006-07-02 18:33:13 UTC (rev 16397) @@ -1003,7 +1003,7 @@ const char *from, time_t time, const char *message) { char *msg_fixed; - char *date = g_strdup(gaim_utf8_strftime("%F %T%z", localtime(&time))); + char *date = g_strdup(gaim_utf8_strftime("%Y-%m-%d %H:%M:%S%z", localtime(&time))); GaimPlugin *plugin = gaim_find_prpl(gaim_account_get_protocol_id(log->account)); GaimLogCommonLoggerData *data = log->logger_data; @@ -1084,7 +1084,7 @@ // append suffix to file and seek back to keep a valid XML document out of the user space buffer { int tail = 0; - const char *date = gaim_utf8_strftime("%F %T%z", localtime(NULL)); + const char *date = gaim_utf8_strftime("%Y-%m-%d %H:%M:%S%z", NULL); tail += fprintf(data->file, "\t<event time=\"%s\" type=\"logEnd\" />\n", date); tail += fprintf(data->file, "</chat>\n"); @@ -1104,7 +1104,7 @@ GaimLogCommonLoggerData *data = log->logger_data; if (data) { if (data->file) { - const char *date = gaim_utf8_strftime("%F %T%z", localtime(NULL)); + const char *date = gaim_utf8_strftime("%Y-%m-%d %H:%M:%S%z", NULL); fprintf(data->file, "\t<event time=\"%s\" type=\"logEnd\" />\n", date); fprintf(data->file, "</chat>\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |