When looking into System log it looks like some programs log the time incorrectly. The router is set in CET timezone (Prague - UTC+2h) and the the entries from dnsmasq are correct while the cron incorrect. And it’s not only cron - e.g. lcollect and other too. It’s not a big deal but when troubleshooting it’s a little challenging to get the right time as I have to check the entries (time sequence) to get the right time.
Any suggestion why is it this way and if I can sync it?
Examples from the system log:
2016-10-29T 11:26:47+02:00 info dnsmasq-dhcp[8355]: DHCPOFFER(br-lan) 192.168.88.53 42:f8:f3:xx:xx:xx
2016-10-29T 09:27:01+02:00 info cron[3683]: (root) CMD (/usr/bin/rainbow_button_sync.sh)
2016-10-29T 11:27:03+02:00 info dnsmasq-dhcp[8355]: DHCPDISCOVER(br-lan) 42:f8:f3:xx:xx:xx
2016-10-28T 21:44:13+02:00 info kernel[]: [ 6.659997] hub 4-0:1.0: USB hub found
2016-10-28T 19:44:14+02:00 info lcollect[1751]: Loading plugin library libplugin_lcollect_majordomo_25.so
Some other logs in logfile, not cron particulary… I also have cron logs and date (command) fine, which is quite strange
For example try look at some ssh logs: 2017-03-10T12:43:40+01:00 info sshd[25607]: Accepted publicke
Edit: I take it back, maybe, that I have cron logs shifted also. Mystery.
2017-03-10T12:50:01+01:00 info /usr/sbin/cron[32336]: (root) CMD (nethist_stats.lua)
2017-03-10T12:50:01+01:00 info /usr/sbin/cron[32337]: (root) CMD ( /usr/bin/notifier)
2017-03-10T12:52:01+01:00 info /usr/sbin/cron[32467]: (root) CMD (nethist_stats.lua)
root@Router:~# date
Fri Mar 10 13:53:26 CET 2017
config timeserver ntp
# When resolution doesn't work because of wrong time (ntp.nic.cz)
list server '217.31.202.100'
list server '195.113.144.201'
list server '195.113.144.238'
list server '2001:1488:ffff::100'
list server 'ntp.nic.cz'
list server '0.openwrt.pool.ntp.org'
list server '1.openwrt.pool.ntp.org'
list server '2.openwrt.pool.ntp.org'
list server '3.openwrt.pool.ntp.org'
option enabled 1
option enable_server '0'
config timeserver 'ntp'
list server '217.31.202.100'
list server '195.113.144.201'
list server '195.113.144.238'
list server '2001:1488:ffff::100'
list server 'ntp.nic.cz'
list server '0.openwrt.pool.ntp.org'
list server '1.openwrt.pool.ntp.org'
list server '2.openwrt.pool.ntp.org'
list server '3.openwrt.pool.ntp.org'
option enabled '1'
After lurking I find that I can confirm first post behauviour. Dnsmasq and syslog-ng itself logs are fine, others (cron, sshd) are 1 hour behind. Date command throws the correct timestamp.
Finally fixed by ignoring senders timezone. This system-ng config works as it should (you can propably change only ISOTIME to R_ISOTIME, if you are comfortable with default format)
This is still an issue in 3.7.5 (I know there are newer versions out, I just haven’t yet updated, because I previously had bad experiences). The timestamps in the system log are totally garbled, both CEST and UTC/GMT are there.
2017-10-17T17:12:04+02:00 info dnsmasq-dhcp[2164]: DHCPACK …
2017-10-17T15:12:05+02:00 info hostapd[]: wlan0: …
2017-10-17T15:12:09+02:00 info hostapd[]: wlan0: …
2017-10-17T15:12:09+02:00 info hostapd[]: wlan0: …
2017-10-17T15:12:09+02:00 info hostapd[]: wlan0: …
2017-10-17T15:12:09+02:00 info hostapd[]: wlan0: …
2017-10-17T17:12:10+02:00 info dnsmasq-dhcp[2164]: DHCPREQUEST …
2017-10-17T17:12:10+02:00 info dnsmasq-dhcp[2164]: DHCPACK …
2017-10-17T15:12:28+02:00 info sshd[19295]: Accepted password for root…