Time of edge devices / k3os is incorrect

The time set in k3os is incorrect resulting e.g., in messages having the wrong timestamp. This can be verified with date

Problem

The time set in k3os is incorrect resulting e.g., in messages having the wrong timestamp. This can be verified with date

Solution

First we need to identify the problem.

  1. Execute date to understand the current time
  2. Execute sudo ntpd -w -d -p pool.ntp.org to get the offset from the timeserver (and to check whether time server is working). Offset is the offset from the localtime to the NTP server.
  3. If there is an offset, check with cat /etc/connman/main.conf whether there are NTP servers set

If NTP is not the issue, it can also be caused by a backlog somewhere in the system. When using older version with the MQTT bridge this could be the cause. In newer version you can check the lag of Kafka with Kowl and then going on consumer groups.