diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-01-01 15:13:05 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-01-01 15:13:05 +0100 |
commit | 4ebd300340bcc0816ed399d19024a0b4833a4b07 (patch) | |
tree | e269436ed8a571613a0e43e97d787d7cd3864ca6 /src/plugins/relay/irc | |
parent | e2bf63cca1c51a5f7387727f7c2c870c4bf660a3 (diff) | |
download | weechat-4ebd300340bcc0816ed399d19024a0b4833a4b07.zip |
relay: send UTC time in irc backlog (when server capability "server-time" is enabled)
Diffstat (limited to 'src/plugins/relay/irc')
-rw-r--r-- | src/plugins/relay/irc/relay-irc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index b0abe4c7f..3fcd1e563 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -598,7 +598,6 @@ relay_irc_get_line_info (struct t_relay_client *client, *message = NULL; msg_date = weechat_hdata_time (hdata_line_data, line_data, "date"); - tm = localtime (&msg_date); num_tags = weechat_hdata_get_var_array_size (hdata_line_data, line_data, "tags_array"); ptr_message = weechat_hdata_pointer (hdata_line_data, line_data, "message"); @@ -694,6 +693,7 @@ relay_irc_get_line_info (struct t_relay_client *client, if (!(RELAY_IRC_DATA(client, server_capabilities) & (1 << RELAY_IRC_CAPAB_SERVER_TIME)) && time_format && time_format[0]) { + tm = localtime (&msg_date); strftime (str_time, sizeof (str_time), time_format, tm); length = strlen (str_time) + strlen (pos) + 1; *message = malloc (length); @@ -726,6 +726,7 @@ relay_irc_get_line_info (struct t_relay_client *client, if (tags && (RELAY_IRC_DATA(client, server_capabilities) & (1 << RELAY_IRC_CAPAB_SERVER_TIME))) { + tm = gmtime (&msg_date); strftime (str_time, sizeof (str_time), "%Y-%m-%dT%H:%M:%S", tm); snprintf (str_tag, sizeof (str_tag), "@time=%s.000Z ", str_time); *tags = strdup (str_tag); |