RADIUS accounting is not following the router Timezone

Hi Everybody

I'm using Coova-chilli on Openwrt 19.07.1. I synchronized my router with NTP servers and whenever I run (date) command I get the correct time. Though, the time I see on RADIUS accounting (radacct) table for the sessions is incorrect. For example, If I switch the router off at 6:30pm then switch it on back again @ 8:15pm, the sessions I open after 8:15pm are reported as @ 6:30pm !

What could be the reason for that?

Radius timestamps are generated by the nas-client (AccessPoint). Make sure the nas-client(s) (accesspoint(s)) is/are ntp-synced with a valid ntp-server and make sure that the timezone is correct. If you run freeradius you can check the records (plain text files) as sent by the nas-client, usually stored in folder /var/log/freeradius/radacct/nas-client-ip/detail-yyyymmdd. In case you have no access to the radius server you can capture/inspect the accounting traffic using wireshark (if not tunneled through ssl of course).

Another possible, more plausible, cause could be that immediate right after the restart the router starts up using the latest timestamp before shutdown (/etc) until re-sync with NTP server. This process takes some minutes and I presume your WiFi clients immediately start to connect before NTP sync is finished. In this case I would suggest you start with the radio's shut and applying a script (to be run once right after start) delaying the unshut of the radio's. See RTC on Lantiq xrx200 (e.g. VGV7510KW22 (o2 6431)) describing a script checking the ntp status where you can decide to unshut the radio interfaces after time sync.

+1 One more issue because of the "feature" of openwrt to sync the time so late dzring startup. Anyway: Having had sane problem , both with chilli and wireguard, I sync the time in singke shot after boot, before starting chilli/wireguard or ntp-service.

@on4awv the sync'ing delay with NTP is not the case .. I switched on the router and kept it ON for 3 full hours before I connected to it for the first time after being ON .. still, the accounting is showing wrong time .. and as you have said, it's the date/time of the last time it was on before rebooting ..

Amazingly, when I login to the openwrt itself and check the date/time, it gives correct date/time .. and it doesn't take any measurable delay to sync with the NTP!

@reinerotto would you please elaborate more regarding sync'ing the time with (singke shot)? how is that done?

Sorry to say, but in case I suspect a commercial system, I do not support for free.

@reinerotto It's indeed a commercial system. How can I communicate with you away from this forum?

Post your problem on freelancer.com . Mention openwrt in title.