summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-18 13:35:59 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-18 13:35:59 +0000
commitf1becea682b563d366add102cd88431f15182b26 (patch)
treeddb0f320ccddad22add4ff5425c53c3dd70696cb /src/controller.c
parentc1c7b9c63d6d2cdf5c42443b7a9c8c80bae49162 (diff)
downloadrspamd-f1becea682b563d366add102cd88431f15182b26.tar.gz
rspamd-f1becea682b563d366add102cd88431f15182b26.zip
[Minor] Use own localtime/gmtime
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/controller.c b/src/controller.c
index 8de9cde8e..61e00fdd5 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -1352,7 +1352,7 @@ rspamd_controller_handle_legacy_history (
{
struct roll_history_row *row, *copied_rows;
guint i, rows_proc, row_num;
- struct tm *tm;
+ struct tm tm;
gchar timebuf[32];
ucl_object_t *top, *obj;
@@ -1373,8 +1373,8 @@ rspamd_controller_handle_legacy_history (
row = &copied_rows[row_num];
/* 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);
+ rspamd_localtime (row->tv.tv_sec, &tm);
+ 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);