irc: fix parsing of "time" message tag on FreeBSD (issue #1289)

v2.8-utf8proc
Sébastien Helleu 2019-01-11 22:40:06 +01:00
parent c96e2f3593
commit 8009094717
2 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ Bug fixes::
* core: fix forced highlight on messages sent to other buffers (issue #1277)
* buflist: fix warning displayed when script buffers.pl is loaded (issue #1274)
* irc: fix parsing of "time" message tag on FreeBSD (issue #1289)
* relay: fix memory leak in connection of client
Tests::

View File

@ -6107,7 +6107,7 @@ irc_protocol_get_message_tag_time (struct t_hashtable *tags)
if (strchr (tag_time, '-'))
{
/* date is with ISO 8601 format: "2012-11-24T07:41:02.018Z" */
strptime (tag_time, "%Y-%m-%dT%H:%M:%S%z", &tm_date);
strptime (tag_time, "%Y-%m-%dT%H:%M:%S", &tm_date);
if (tm_date.tm_year > 0)
{
time_msg = mktime (&tm_date);