Radius acctstarttime

Alan DeKok aland at deployingradius.com
Sun Mar 25 00:12:41 CET 2018

On Mar 24, 2018, at 7:06 PM, Oscar Jofre <oscar at jofre.com> wrote:
> I thought that acctstarttime was set according the date time from the system
> where is installed freeradius (centos + mariadb for me)

  No.  Acct-Start-Time is sent by the NAS.  FreeRADIUS just writes it in the DB.

> But I've seen today some rows from today (according radacctid) with a
> different time stamp (1970-04-13):

  Because the time on the NAS is wrong.

> I had an incorrect date on the mikrotik from the example, just the same date
> that is on the database,


> so then I thought that the acctstartime comes from
> router clock.

  It comes from the NAS.

> but the routers I have In Taiwan with Taiwan clock don't save
> on accstarttime the router clock, they still saving data according the
> system where I have installed freeradius.

  The NAS sends the time to FreeRADIUS as a 32-bit number.  NOT as a printable string.  And there's no time zone information.  FreeRADIUS takes this time, converts it to a string, and writes it to the DB.

  So if both the NAS and FreeRADIUS use NTP for the correct time, they should have the same time.

  Alan DeKok.

More information about the Freeradius-Users mailing list