system: fix localtime value in ubus info method output
[project/procd.git] / system.c
index 504cdc0..569a75d 100644 (file)
--- a/system.c
+++ b/system.c
@@ -205,7 +205,7 @@ static int system_info(struct ubus_context *ctx, struct ubus_object *obj,
 
        blob_buf_init(&b, 0);
 
-       blobmsg_add_u32(&b, "localtime", mktime(tm));
+       blobmsg_add_u32(&b, "localtime", now + tm->tm_gmtoff);
 
 #ifdef linux
        blobmsg_add_u32(&b, "uptime",    info.uptime);