bengalih
Senior Member
I've been seeing this issue for a long time, but just decided to go about trying to fix as I'm trying to parse through a bunch of logs and would rather not deal with the discrepancies.
I wasn't sure exactly what was going on at first, but I noticed that some apps (seemingly third party ones installed in Entware) was logging with the hours off, like this:
I realized that it was always 5 hours off, and that equated to GMT time. Once I realized that I was able to find the following:
github.com
and
www.snbforums.com
Using the information from the second thread I did the following:
Here is another example which is strance becuse it shows the start_vpnserver1 log first the right time, then nearer the bottom the same apparent rc_service logs time in GMT:
These rc_service entries appear to only log incorrect time at boot. If for instance I issue a "service restart_ddns" after the system is up, the logged time seems correct.
However all "keymaster" entries which are logged when I restart entware services from /opt/etc/init.d are logging the wrong time.
I want to stress that the services themselves are now (after the above fixes) properly logging time, but the "keymaster" entry is not, as in:
(again, previously al these would have been logged in GMT, but now only keymaster).
I'm not completely sure of the way that rc_service is called (especially at boot) and if that can't be fixed I can live with those incorrect.
Also, the keymaster entries are easy to spot being a single entry in the middle of properly logged service info.
However hoping @RMerlin or another educated user can shed any light.
Can these discrepancies be prevented, or are they inevitable?
thx
I wasn't sure exactly what was going on at first, but I noticed that some apps (seemingly third party ones installed in Entware) was logging with the hours off, like this:
Code:
Apr 3 17:04:48 dnsmasq-dhcp[369]: no address range available for DHCP request via br0
Apr 3 22:04:49 dhcp6_client: bound address 2001:506:7ae0:13ca::1/128, prefix 2600:1700:ae01:cea1::/64
Apr 3 22:04:49 rc_service: dhcp6c 1749:notify_rc restart_ddns
Apr 3 22:04:49 rc_service: waitting "start_vpnserver1" via udhcpc ...
Apr 3 17:04:52 kernel: D977E6B0000000001030307)
Apr 3 17:04:54 ovpn-server1[2116]: --cipher is not set. Previous OpenVPN version defaulted to BF-CBC as fallback when cipher negotiation failed in this case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers.
I realized that it was always 5 hours off, and that equated to GMT time. Once I realized that I was able to find the following:
Using time zones
Ultimate repo for embedded devices. Contribute to Entware/Entware development by creating an account on GitHub.

Entware Timezone Issue
I have an RT-AC88U on Merlin 3.84.7_2 with: /etc/locatime -> /opt/share/zoneinfo/US/Pacific AND export TZ=:/opt/share/zoneinfo/US/Pacific in /opt/etc/profile and yet my Entware applications are putting GMT times in the system log. I have rebooted the router several times and the above changes...

Using the information from the second thread I did the following:
- "opkg install zoneinfo-northamerica"
- "ln -sf /opt/share/zoneinfo/US/Central /etc/localtime"
- added "export TZ=:/opt/share/zoneinfo/US/Central" into /opt/etc/init.d/rc.func
Code:
Apr 3 22:04:20 keymaster: Started odhcp6c from /jffs/scripts/post-mount.
Apr 3 22:04:20 keymaster: Started wpa_supplicant from /jffs/scripts/post-mount.
Apr 3 22:04:21 keymaster: Started apcupsd from /jffs/scripts/post-mount.
Apr 3 22:04:21 keymaster: Started atd from /jffs/scripts/post-mount.
Apr 3 22:04:21 keymaster: Started lighttpd from /jffs/scripts/post-mount.
Apr 3 22:04:49 dhcp6_client: bound address 2001:506:7ae0:13ca::1/128, prefix 2600:1700:ae01:cea1::/64
Apr 3 22:04:49 rc_service: dhcp6c 1749:notify_rc restart_ddns
Apr 3 22:04:49 rc_service: waitting "start_vpnserver1" via udhcpc ...
Here is another example which is strance becuse it shows the start_vpnserver1 log first the right time, then nearer the bottom the same apparent rc_service logs time in GMT:
Code:
Apr 3 17:04:42 custom_script: Running /jffs/scripts/service-event (args: start vpnserver1)
Apr 3 17:04:42 rc_service: udhcpc 1335:notify_rc start_vpnserver2
Apr 3 17:04:42 rc_service: waitting "start_vpnserver1" via udhcpc ...
Apr 3 17:04:42 syslog: wlceventd_proc_event(527): eth2: Auth B8:C7:5D:DB:2A:FC, status: Successful (0), rssi:0
Apr 3 17:04:42 syslog: wlceventd_proc_event(556): eth2: Assoc B8:C7:5D:DB:2A:FC, status: Successful (0), rssi:0
Apr 3 17:04:42 dnsmasq-dhcp[369]: no address range available for DHCP request via br0
Apr 3 17:04:46 kernel: 02080AED97664B0000000001030307)
Apr 3 17:04:46 dnsmasq-dhcp[369]: no address range available for DHCP request via br0
Apr 3 17:04:48 syslog: wlceventd_proc_event(527): eth2: Auth 24:77:03:2F:F6:E4, status: Successful (0), rssi:0
Apr 3 17:04:48 syslog: wlceventd_proc_event(527): eth2: Auth 24:77:03:2F:F6:E4, status: Successful (0), rssi:0
Apr 3 17:04:48 syslog: wlceventd_proc_event(527): eth2: Auth 24:77:03:2F:F6:E4, status: Successful (0), rssi:0
Apr 3 17:04:48 dnsmasq-dhcp[369]: no address range available for DHCP request via br0
Apr 3 22:04:49 dhcp6_client: bound address 2001:506:7ae0:13ca::1/128, prefix 2600:1700:ae01:cea1::/64
Apr 3 22:04:49 rc_service: dhcp6c 1749:notify_rc restart_ddns
Apr 3 22:04:49 rc_service: waitting "start_vpnserver1" via udhcpc ...
Apr 3 17:04:52 kernel: D977E6B0000000001030307)
Apr 3 17:04:54 ovpn-server1[2116]: --cipher is not set. Previous OpenVPN version defaulted to BF-CBC as fallback when cipher negotiation failed in this case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers.
These rc_service entries appear to only log incorrect time at boot. If for instance I issue a "service restart_ddns" after the system is up, the logged time seems correct.
However all "keymaster" entries which are logged when I restart entware services from /opt/etc/init.d are logging the wrong time.
I want to stress that the services themselves are now (after the above fixes) properly logging time, but the "keymaster" entry is not, as in:
Code:
Apr 3 17:27:54 apcupsd[1276]: apcupsd exiting, signal 15
Apr 3 17:27:54 apcupsd[1276]: apcupsd shutdown succeeded
Apr 3 22:27:55 keymaster: Started apcupsd from .
Apr 3 17:27:55 apcupsd[8113]: apcupsd 3.14.14 (31 May 2016) unknown startup succeeded
Apr 3 17:27:55 apcupsd[8113]: NIS server startup succeeded
(again, previously al these would have been logged in GMT, but now only keymaster).
I'm not completely sure of the way that rc_service is called (especially at boot) and if that can't be fixed I can live with those incorrect.
Also, the keymaster entries are easy to spot being a single entry in the middle of properly logged service info.
However hoping @RMerlin or another educated user can shed any light.
Can these discrepancies be prevented, or are they inevitable?
thx