comparison plugins/log_reader.c @ 13119:fcde3faa1f57

[gaim-migrate @ 15481] This adds support for displaying log timestamps in their original timezone. If your OS's definition of struct tm sucks, then the log timestamps will show up in your local timezone, but converted, so the time is accurate. Yay! Anyway, this all works, as I've renamed lots of my log files locally, but currently, there's no code to save new logs in this name format. That's held up on a portability issue and backwards compatibility issue. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sat, 04 Feb 2006 20:55:52 +0000
parents ae51c59bf819
children 3a97c65196d1
comparison
equal deleted inserted replaced
13118:8855973b487b 13119:fcde3faa1f57
154 data->type = ADIUM_HTML; 154 data->type = ADIUM_HTML;
155 155
156 tm.tm_year -= 1900; 156 tm.tm_year -= 1900;
157 tm.tm_mon -= 1; 157 tm.tm_mon -= 1;
158 158
159 log = gaim_log_new(GAIM_LOG_IM, sn, account, NULL, mktime(&tm)); 159 /* XXX: Look into this later... Should we pass in a struct tm? */
160 log = gaim_log_new(GAIM_LOG_IM, sn, account, NULL, mktime(&tm), NULL);
160 log->logger = adium_logger; 161 log->logger = adium_logger;
161 log->logger_data = data; 162 log->logger_data = data;
162 163
163 list = g_list_append(list, log); 164 list = g_list_append(list, log);
164 } 165 }
214 215
215 data = g_new0(struct adium_logger_data, 1); 216 data = g_new0(struct adium_logger_data, 1);
216 data->path = filename; 217 data->path = filename;
217 data->type = ADIUM_TEXT; 218 data->type = ADIUM_TEXT;
218 219
219 log = gaim_log_new(GAIM_LOG_IM, sn, account, NULL, mktime(&tm)); 220 /* XXX: Look into this later... Should we pass in a struct tm? */
221 log = gaim_log_new(GAIM_LOG_IM, sn, account, NULL, mktime(&tm), NULL);
220 log->logger = adium_logger; 222 log->logger = adium_logger;
221 log->logger_data = data; 223 log->logger_data = data;
222 224
223 list = g_list_append(list, log); 225 list = g_list_append(list, log);
224 } 226 }
728 data->message = message; 730 data->message = message;
729 data->session_id = session_id; 731 data->session_id = session_id;
730 data->text = NULL; 732 data->text = NULL;
731 data->last_log = FALSE; 733 data->last_log = FALSE;
732 734
733 log = gaim_log_new(GAIM_LOG_IM, sn, account, NULL, msn_logger_parse_timestamp(message)); 735 /* XXX: Look into this later... Should we pass in a struct tm? */
736 log = gaim_log_new(GAIM_LOG_IM, sn, account, NULL, msn_logger_parse_timestamp(message), NULL);
734 log->logger = msn_logger; 737 log->logger = msn_logger;
735 log->logger_data = data; 738 log->logger_data = data;
736 739
737 list = g_list_append(list, log); 740 list = g_list_append(list, log);
738 } 741 }
1242 data->offset = offset; 1245 data->offset = offset;
1243 data->length = 0; 1246 data->length = 0;
1244 data->their_nickname = 1247 data->their_nickname =
1245 g_strdup(their_nickname); 1248 g_strdup(their_nickname);
1246 1249
1250 /* XXX: Look into this later... Should we pass in a struct tm? */
1247 log = gaim_log_new(GAIM_LOG_IM, 1251 log = gaim_log_new(GAIM_LOG_IM,
1248 sn, account, NULL, mktime(&tm)); 1252 sn, account, NULL, mktime(&tm), NULL);
1249 log->logger = trillian_logger; 1253 log->logger = trillian_logger;
1250 log->logger_data = data; 1254 log->logger_data = data;
1251 1255
1252 list = g_list_append(list, log); 1256 list = g_list_append(list, log);
1253 } 1257 }