I have a little issue with the time in openhab. Explanation:
On my openhabpanel the correct time is displayed.
But when I introduce the command “date” into the command line, the wrong time is displayed.
I already tried to change the time zone through the openhabian-config menu. But unfortunately, this time is also not the correct one.
When I introduce the commande timedatectl, I didn’t find the RTC clock
[09:59:00] openhabian@openHABianPi:~$ timedatectl
Local time: Sat 2017-11-04 10:02:16 CET
Universal time: Sat 2017-11-04 09:02:16 UTC
RTC time: n/a
Time zone: Europe/Berlin (CET, +0100)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: yes
DST active: no
Last DST change: DST ended at
Sun 2017-10-29 02:59:59 CEST
Sun 2017-10-29 02:00:00 CET
Next DST change: DST begins (the clock jumps one hour forward) at
Sun 2018-03-25 01:59:59 CET
Sun 2018-03-25 03:00:00 CEST
Warning: The system is configured to read the RTC time in the local time zone. This
mode can not be fully supported. It will create various problems with time
zone changes and daylight saving time adjustments. The RTC time is never updated,
it relies on external facilities to maintain it. If at all possible, use
RTC in UTC by calling 'timedatectl set-local-rtc 0'.
I have no idea what the issue was. The command restart the network time server daemon which synchronizes the clock on the machine with a configured time server. Restarting it should force it to reach out and grab the current time.
Even doing as you suggest it does not working for me, system (raspbian) is with currently correct date as below:
[15:04:25] openhabian@openhabian:~$ timedatectl
Local time: qua 2020-02-05 15:08:09 -03
Universal time: qua 2020-02-05 18:08:09 UTC
RTC time: n/a
Time zone: America/Sao_Paulo (-03, -0300)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
However, from ntp binbding and logview it’s not correct. Also on BASICUI where we use following think
If NTP is inactive, activate NTP with sudo timedatectl set-ntp True and check afterwards the status again with timedatectl status. NTP should be running now and the time should be set correctly.