]> source.dussan.org Git - rspamd.git/commitdiff
Fix time output in history.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 4 Nov 2014 13:14:41 +0000 (13:14 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 4 Nov 2014 13:14:41 +0000 (13:14 +0000)
src/controller.c

index 2fb23877e38df2800663b298d647e5b703c24fa8..57653efd541bba8be7d93bd5fce1f1f5ef1488e6 100644 (file)
@@ -674,6 +674,7 @@ rspamd_controller_handle_history (struct rspamd_http_connection_entry *conn_ent,
                /* Get only completed rows */
                if (row->completed) {
                        tm = localtime (&row->tv.tv_sec);
+                       strftime (timebuf, sizeof (timebuf) - 1, "%Y-%m-%d %H:%M:%S", tm);
                        obj = ucl_object_typed_new (UCL_OBJECT);
                        ucl_object_insert_key (obj, ucl_object_fromstring (
                                        timebuf),                 "time", 0, false);