Mercurial > pidgin.yaz
comparison src/log.c @ 13154:0d755026832c
[gaim-migrate @ 15517]
Save timezone information in the name of log files.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 07 Feb 2006 08:01:20 +0000 |
parents | fcde3faa1f57 |
children | 44188ee27d59 |
comparison
equal
deleted
inserted
replaced
13153:caee920323e2 | 13154:0d755026832c |
---|---|
631 if (dir == NULL) | 631 if (dir == NULL) |
632 return; | 632 return; |
633 | 633 |
634 gaim_build_dir (dir, S_IRUSR | S_IWUSR | S_IXUSR); | 634 gaim_build_dir (dir, S_IRUSR | S_IWUSR | S_IXUSR); |
635 | 635 |
636 date = gaim_utf8_strftime("%Y-%m-%d.%H%M%S", localtime(&log->time)); | 636 date = gaim_utf8_strftime("%Y-%m-%d.%H%M%S%z%Z", localtime(&log->time)); |
637 | 637 |
638 filename = g_strdup_printf("%s%s", date, ext ? ext : ""); | 638 filename = g_strdup_printf("%s%s", date, ext ? ext : ""); |
639 | 639 |
640 path = g_build_filename(dir, filename, NULL); | 640 path = g_build_filename(dir, filename, NULL); |
641 g_free(dir); | 641 g_free(dir); |
875 * creating a new file there would result in empty files in the case | 875 * creating a new file there would result in empty files in the case |
876 * that you open a convo with someone, but don't say anything. | 876 * that you open a convo with someone, but don't say anything. |
877 */ | 877 */ |
878 const char *date; | 878 const char *date; |
879 char *dir = gaim_log_get_log_dir(log->type, log->name, log->account); | 879 char *dir = gaim_log_get_log_dir(log->type, log->name, log->account); |
880 FILE *file; | 880 char *filename; |
881 | 881 |
882 if (dir == NULL) | 882 if (dir == NULL) |
883 return; | 883 return; |
884 | 884 |
885 date = gaim_utf8_strftime("%Y-%m-%d.%H%M%S.xml", localtime(&log->time)); | 885 date = gaim_utf8_strftime("%Y-%m-%d.%H%M%S%z%Z.xml", localtime(&log->time)); |
886 | 886 |
887 gaim_build_dir (dir, S_IRUSR | S_IWUSR | S_IXUSR); | 887 gaim_build_dir (dir, S_IRUSR | S_IWUSR | S_IXUSR); |
888 | 888 |
889 char *filename = g_build_filename(dir, date, NULL); | 889 filename = g_build_filename(dir, date, NULL); |
890 g_free(dir); | 890 g_free(dir); |
891 | 891 |
892 log->logger_data = g_fopen(filename, "a"); | 892 log->logger_data = g_fopen(filename, "a"); |
893 if (!log->logger_data) { | 893 if (!log->logger_data) { |
894 gaim_debug(GAIM_DEBUG_ERROR, "log", "Could not create log file %s\n", filename); | 894 gaim_debug(GAIM_DEBUG_ERROR, "log", "Could not create log file %s\n", filename); |